mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: add flipping for multiple elements (#5578)
* feat: add flipping when resizing multiple elements * fix: image elements not flipping its content * test: fix accidental resizing in grouping test * fix: angles not flipping vertically when resizing * feat: add flipping multiple elements with a command * revert: image elements not flipping its content This reverts commit cb989a6c66e62a02a8c04ce41f12507806c8d0a0. * fix: add special cases for flipping text & images * fix: a few corner cases for flipping * fix: remove angle flip * fix: bound text scaling when resizing * fix: linear elements drifting away after multiple flips * revert: fix linear elements drifting away after multiple flips This reverts commitbffc33dd3f
. * fix: linear elements unstable bounds * revert: linear elements unstable bounds This reverts commit22ae9b02c4
. * fix: hand-drawn lines shift after flipping * test: fix flipping tests * test: fix the number of context menu items * fix: incorrect scaling due to ignoring bound text when finding selection bounds * fix: bound text coordinates not being updated * fix: lines bound text rotation * fix: incorrect placement of bound lines on flip * remove redundant predicates in actionFlip * update test * refactor resizeElement with some renaming and comments * fix grouped bounded text elements not being flipped correctly * combine mutation for bounded text element * remove incorrect return * fix: linear elements bindings after flipping * revert: remove incorrect return This reverts commite6b205ca90
. * fix: minimum size for all elements in selection --------- Co-authored-by: Ryan Di <ryan.weihao.di@gmail.com>
This commit is contained in:
parent
75bea48b54
commit
6459ccda6a
7 changed files with 240 additions and 282 deletions
|
@ -15332,7 +15332,10 @@ Object {
|
|||
"penMode": false,
|
||||
"pendingImageElementId": null,
|
||||
"previousSelectedElementIds": Object {
|
||||
"id0": true,
|
||||
"id1": true,
|
||||
"id2": true,
|
||||
"id3": true,
|
||||
},
|
||||
"resizingElement": null,
|
||||
"scrollX": 0,
|
||||
|
@ -15342,7 +15345,6 @@ Object {
|
|||
"id0": true,
|
||||
"id1": true,
|
||||
"id2": true,
|
||||
"id3": true,
|
||||
"id5": true,
|
||||
},
|
||||
"selectedGroupIds": Object {},
|
||||
|
@ -15390,7 +15392,7 @@ Object {
|
|||
"type": "rectangle",
|
||||
"updated": 1,
|
||||
"version": 4,
|
||||
"versionNonce": 1505387817,
|
||||
"versionNonce": 23633383,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
|
@ -15421,7 +15423,7 @@ Object {
|
|||
"type": "rectangle",
|
||||
"updated": 1,
|
||||
"version": 4,
|
||||
"versionNonce": 23633383,
|
||||
"versionNonce": 493213705,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
|
@ -15452,7 +15454,7 @@ Object {
|
|||
"type": "rectangle",
|
||||
"updated": 1,
|
||||
"version": 4,
|
||||
"versionNonce": 493213705,
|
||||
"versionNonce": 915032327,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
|
@ -15803,7 +15805,6 @@ Object {
|
|||
"id0": true,
|
||||
"id1": true,
|
||||
"id2": true,
|
||||
"id3": true,
|
||||
"id5": true,
|
||||
},
|
||||
"selectedGroupIds": Object {},
|
||||
|
@ -15833,7 +15834,7 @@ Object {
|
|||
"type": "rectangle",
|
||||
"updated": 1,
|
||||
"version": 4,
|
||||
"versionNonce": 1505387817,
|
||||
"versionNonce": 23633383,
|
||||
"width": 10,
|
||||
"x": 10,
|
||||
"y": 10,
|
||||
|
@ -15861,7 +15862,7 @@ Object {
|
|||
"type": "rectangle",
|
||||
"updated": 1,
|
||||
"version": 4,
|
||||
"versionNonce": 23633383,
|
||||
"versionNonce": 493213705,
|
||||
"width": 10,
|
||||
"x": 30,
|
||||
"y": 10,
|
||||
|
@ -15889,7 +15890,7 @@ Object {
|
|||
"type": "rectangle",
|
||||
"updated": 1,
|
||||
"version": 4,
|
||||
"versionNonce": 493213705,
|
||||
"versionNonce": 915032327,
|
||||
"width": 10,
|
||||
"x": 50,
|
||||
"y": 10,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue