mirror of
https://github.com/penpot/penpot.git
synced 2025-07-31 23:48:33 +02:00
🐛 Fix vertical flip for nested shapes
This commit is contained in:
parent
55784f64b8
commit
75c8d97a6e
1 changed files with 4 additions and 3 deletions
|
@ -220,7 +220,6 @@
|
||||||
"Given a new set of points transformed, set up the rectangle so it keeps
|
"Given a new set of points transformed, set up the rectangle so it keeps
|
||||||
its properties. We adjust de x,y,width,height and create a custom transform"
|
its properties. We adjust de x,y,width,height and create a custom transform"
|
||||||
[shape transform round-coords?]
|
[shape transform round-coords?]
|
||||||
;;
|
|
||||||
(let [points (-> shape :points (gco/transform-points transform))
|
(let [points (-> shape :points (gco/transform-points transform))
|
||||||
center (gco/center-points points)
|
center (gco/center-points points)
|
||||||
|
|
||||||
|
@ -445,8 +444,10 @@
|
||||||
transform))
|
transform))
|
||||||
|
|
||||||
(defn- set-flip [shape modifiers]
|
(defn- set-flip [shape modifiers]
|
||||||
(let [rx (get-in modifiers [:resize-vector :x])
|
(let [rx (or (get-in modifiers [:resize-vector :x])
|
||||||
ry (get-in modifiers [:resize-vector :y])]
|
(get-in modifiers [:resize-vector-2 :x]))
|
||||||
|
ry (or (get-in modifiers [:resize-vector :y])
|
||||||
|
(get-in modifiers [:resize-vector-2 :y]))]
|
||||||
(cond-> shape
|
(cond-> shape
|
||||||
(and rx (< rx 0)) (-> (update :flip-x not)
|
(and rx (< rx 0)) (-> (update :flip-x not)
|
||||||
(update :rotation -))
|
(update :rotation -))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue