mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
don't flip video when negative scaling
This commit is contained in:
parent
49f2c88978
commit
4027a5b245
1 changed files with 14 additions and 7 deletions
|
@ -587,13 +587,20 @@ export const resizeSingleElement = (
|
||||||
};
|
};
|
||||||
|
|
||||||
if ("scale" in element && "scale" in stateAtResizeStart) {
|
if ("scale" in element && "scale" in stateAtResizeStart) {
|
||||||
if (isEmbeddableElement(element) && shouldMaintainAspectRatio) {
|
if (isEmbeddableElement(element)) {
|
||||||
const scale: [number, number] = [
|
if (shouldMaintainAspectRatio) {
|
||||||
eleNewWidth / (stateAtResizeStart.width / stateAtResizeStart.scale[0]),
|
const scale: [number, number] = [
|
||||||
eleNewHeight /
|
Math.abs(
|
||||||
(stateAtResizeStart.height / stateAtResizeStart.scale[1]),
|
eleNewWidth /
|
||||||
];
|
(stateAtResizeStart.width / stateAtResizeStart.scale[0]),
|
||||||
mutateElement(element, { scale });
|
),
|
||||||
|
Math.abs(
|
||||||
|
eleNewHeight /
|
||||||
|
(stateAtResizeStart.height / stateAtResizeStart.scale[1]),
|
||||||
|
),
|
||||||
|
];
|
||||||
|
mutateElement(element, { scale });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mutateElement(element, {
|
mutateElement(element, {
|
||||||
scale: [
|
scale: [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue