mirror of
https://github.com/penpot/penpot.git
synced 2025-06-06 21:51:39 +02:00
🐛 Fix problem with flip rotations
This commit is contained in:
parent
099d1259b2
commit
ad4c1aae45
1 changed files with 9 additions and 1 deletions
|
@ -258,9 +258,17 @@
|
||||||
(-> (gsh/transform-bounds (:points shape) center modifiers)
|
(-> (gsh/transform-bounds (:points shape) center modifiers)
|
||||||
(gsh/points->rect))
|
(gsh/points->rect))
|
||||||
|
|
||||||
target-p (gpt/round (gpt/point raw-bounds))
|
flip-x? (neg? (get-in modifiers [:resize-vector :x]))
|
||||||
|
flip-y? (neg? (get-in modifiers [:resize-vector :y]))
|
||||||
|
|
||||||
target-width (max 1 (mth/round (:width raw-bounds)))
|
target-width (max 1 (mth/round (:width raw-bounds)))
|
||||||
target-height (max 1 (mth/round (:height raw-bounds)))
|
target-height (max 1 (mth/round (:height raw-bounds)))
|
||||||
|
target-p (cond-> (gpt/round (gpt/point raw-bounds))
|
||||||
|
flip-x?
|
||||||
|
(update :x + target-width)
|
||||||
|
|
||||||
|
flip-y?
|
||||||
|
(update :y + target-height))
|
||||||
|
|
||||||
ratio-width (/ target-width (:width raw-bounds))
|
ratio-width (/ target-width (:width raw-bounds))
|
||||||
ratio-height (/ target-height (:height raw-bounds))
|
ratio-height (/ target-height (:height raw-bounds))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue