mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-17 22:40:54 +02:00
fix: image elements not flipping its content
This commit is contained in:
@@ -25,6 +25,7 @@ import {
|
|||||||
isArrowElement,
|
isArrowElement,
|
||||||
isBoundToContainer,
|
isBoundToContainer,
|
||||||
isFreeDrawElement,
|
isFreeDrawElement,
|
||||||
|
isImageElement,
|
||||||
isLinearElement,
|
isLinearElement,
|
||||||
isTextElement,
|
isTextElement,
|
||||||
} from "./typeChecks";
|
} from "./typeChecks";
|
||||||
@@ -694,6 +695,7 @@ const resizeMultipleElements = (
|
|||||||
points?: Point[];
|
points?: Point[];
|
||||||
fontSize?: number;
|
fontSize?: number;
|
||||||
baseline?: number;
|
baseline?: number;
|
||||||
|
scale?: [-1 | 1, -1 | 1];
|
||||||
} = {
|
} = {
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
@@ -737,6 +739,10 @@ const resizeMultipleElements = (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isImageElement(element.orig)) {
|
||||||
|
update.scale = [flipFactorX, flipFactorY];
|
||||||
|
}
|
||||||
|
|
||||||
updateBoundElements(element.latest, { newSize: { width, height } });
|
updateBoundElements(element.latest, { newSize: { width, height } });
|
||||||
|
|
||||||
mutateElement(element.latest, update);
|
mutateElement(element.latest, update);
|
||||||
|
Reference in New Issue
Block a user