0
Fork 0
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:
Andrey Antukh 2016-01-30 13:50:37 +02:00
parent 17597ced08
commit 1f22b424f5

View file

@ -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 _]