Fix selrect position for group of lines.

This commit is contained in:
Andrey Antukh 2016-01-29 00:09:36 +02:00
parent 55fd2ae629
commit df08ed6dd2

View File

@ -160,11 +160,14 @@
(container-rect $)))) (container-rect $))))
(defmethod -outer-rect :builtin/line (defmethod -outer-rect :builtin/line
[shape] [{:keys [x1 y1 x2 y2 group] :as shape}]
(let [{:keys [x1 y1 x2 y2]} shape (let [group (get-in @st/state [:shapes-by-id group])
props {:x x1 :y y1 :width (- x2 x1) :height (- y2 y1)} props {:x (+ x1 (:dx group 0))
shape (merge shape props)] :y (+ y1 (:dy group 0))
(container-rect shape))) :width (- x2 x1)
:height (- y2 y1)}]
(-> (merge shape props)
(container-rect))))
(defmethod -outer-rect :builtin/group (defmethod -outer-rect :builtin/group
[{:keys [id group rotation dx dy] :as shape}] [{:keys [id group rotation dx dy] :as shape}]