mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-04-14 16:40:58 -04:00
fix: image horizontal flip fix + improved tests (#5799)
Co-authored-by: Antonio Della Fortuna <a.dellafortuna00@gmail.com> Co-authored-by: dwelle <luzar.david@gmail.com> fixes https://github.com/excalidraw/excalidraw/issues/5784
This commit is contained in:
parent
809d5ba17f
commit
06b45e0cfc
2 changed files with 621 additions and 507 deletions
|
@ -557,10 +557,10 @@ export const resizeSingleElement = (
|
||||||
mutateElement(element, {
|
mutateElement(element, {
|
||||||
scale: [
|
scale: [
|
||||||
// defaulting because scaleX/Y can be 0/-0
|
// defaulting because scaleX/Y can be 0/-0
|
||||||
(Math.sign(scaleX) || stateAtResizeStart.scale[0]) *
|
(Math.sign(newBoundsX2 - stateAtResizeStart.x) ||
|
||||||
stateAtResizeStart.scale[0],
|
stateAtResizeStart.scale[0]) * stateAtResizeStart.scale[0],
|
||||||
(Math.sign(scaleY) || stateAtResizeStart.scale[1]) *
|
(Math.sign(newBoundsY2 - stateAtResizeStart.y) ||
|
||||||
stateAtResizeStart.scale[1],
|
stateAtResizeStart.scale[1]) * stateAtResizeStart.scale[1],
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue