mirror of
https://github.com/penpot/penpot.git
synced 2025-06-21 17:27:00 +02:00
Fixed selection positioning with neested groups.
This commit is contained in:
parent
17597ced08
commit
1f22b424f5
1 changed files with 8 additions and 3 deletions
|
@ -255,9 +255,14 @@
|
||||||
y' (apply max (map (fn [{:keys [y height]}] (+ y height)) shapes))
|
y' (apply max (map (fn [{:keys [y height]}] (+ y height)) shapes))
|
||||||
width (- x' x)
|
width (- x' x)
|
||||||
height (- y' y)]
|
height (- y' y)]
|
||||||
(as-> shape $
|
(let [group (get-in @st/state [:shapes-by-id group])]
|
||||||
(merge $ {:width width :height height :x x :y y})
|
(as-> shape $
|
||||||
(container-rect $))))
|
(merge $ {:width width
|
||||||
|
:height height
|
||||||
|
:x (+ x (or (:dx group) 0))
|
||||||
|
:y (+ y (or (:dy group) 0))
|
||||||
|
})
|
||||||
|
(container-rect $)))))
|
||||||
|
|
||||||
(defmethod -outer-rect :default
|
(defmethod -outer-rect :default
|
||||||
[shape _]
|
[shape _]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue