mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: image elements not flipping its content
This commit is contained in:
parent
a941173be4
commit
d1be72ffc2
1 changed files with 6 additions and 0 deletions
|
@ -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);
|
||||||
|
|
Loading…
Add table
Reference in a new issue