UNPKG

react-filerobot-video-editor

Version:

React component version of filerobot video editor (FVE).

1 lines 493 B
var getSizeAfterRotation=function(a,b){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:0,d=Math.abs(c),e=Math.round(c),f=90<d,g=f?d-90:d,h=f?b:a,i=f?a:b,j=g*Math.PI/180,k=Math.abs(Math.sin(j)),l=Math.abs(Math.cos(j));return{width:Math.round(h*l)+Math.round(i*k),height:Math.round(h*k)+Math.round(i*l),offsetTop:0<=e&&90>=e?0:function(){return 0>e&&-90<e?h*k:90<e?h*k:i*l+h*k}(),offsetLeft:0>=e&&-90<=e?0:function(){return 90<e?h*l+i*k:i*k}()}};export default getSizeAfterRotation;