@flozy/editor 4.3.9 → 4.4.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -179,7 +179,7 @@ const Video = ({
|
|
179
179
|
const getWidth = () => {
|
180
180
|
if (resizing) {
|
181
181
|
return {
|
182
|
-
width: size.
|
182
|
+
width: size.widthInPercent ? `${size.widthInPercent}%` : "100%",
|
183
183
|
height: url ? `${size.height || 370}px` : "auto"
|
184
184
|
};
|
185
185
|
} else {
|
@@ -50,9 +50,10 @@ const useResize = ({
|
|
50
50
|
setSize(currentSize => {
|
51
51
|
const calcWidth = (currentSize.width || width) + e.movementX;
|
52
52
|
const cWP = calcWidth / width * 100;
|
53
|
+
const calcHeight = (parseInt(currentSize.height) || height) + e.movementY;
|
53
54
|
const calc = {
|
54
|
-
width: calcWidth,
|
55
|
-
height: (
|
55
|
+
width: Math.max(calcWidth, 140),
|
56
|
+
height: Math.max(calcHeight, 50),
|
56
57
|
widthInPercent: cWP > 100 ? 100 : cWP
|
57
58
|
};
|
58
59
|
latest = calc;
|