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 commit bffc33dd3f.

* fix: linear elements unstable bounds

* revert: linear elements unstable bounds

This reverts commit 22ae9b02c4.

* 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 commit e6b205ca90.

* fix: minimum size for all elements in selection

---------

Co-authored-by: Ryan Di <ryan.weihao.di@gmail.com>
This commit is contained in:
Alex Kim 2023-05-25 19:27:41 +05:00 committed by GitHub
parent 75bea48b54
commit 6459ccda6a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 240 additions and 282 deletions

View file

@ -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",
},