mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 23:31:21 -05: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))
|
||||
width (- x' x)
|
||||
height (- y' y)]
|
||||
(as-> shape $
|
||||
(merge $ {:width width :height height :x x :y y})
|
||||
(container-rect $))))
|
||||
(let [group (get-in @st/state [:shapes-by-id group])]
|
||||
(as-> shape $
|
||||
(merge $ {:width width
|
||||
:height height
|
||||
:x (+ x (or (:dx group) 0))
|
||||
:y (+ y (or (:dy group) 0))
|
||||
})
|
||||
(container-rect $)))))
|
||||
|
||||
(defmethod -outer-rect :default
|
||||
[shape _]
|
||||
|
|
Loading…
Add table
Reference in a new issue