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
@ -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…
x
Reference in New Issue
Block a user