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:
@@ -197,7 +197,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipHorizontal",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -207,7 +206,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipVertical",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -4594,7 +4592,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipHorizontal",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -4604,7 +4601,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipVertical",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -5144,7 +5140,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipHorizontal",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -5154,7 +5149,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipVertical",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -6003,7 +5997,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipHorizontal",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -6013,7 +6006,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipVertical",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -6349,7 +6341,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipHorizontal",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
@@ -6359,7 +6350,6 @@ Object {
|
||||
"keyTest": [Function],
|
||||
"name": "flipVertical",
|
||||
"perform": [Function],
|
||||
"predicate": [Function],
|
||||
"trackEvent": Object {
|
||||
"category": "element",
|
||||
},
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user