0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 17:00:36 -05:00

🐛 Fixed problem with groups

This commit is contained in:
alonso.torres 2020-12-11 08:27:51 +01:00
parent 45882ba6a1
commit 574e8a92a8
2 changed files with 6 additions and 3 deletions

View file

@ -270,12 +270,12 @@
points (->> children (mapcat :points)) points (->> children (mapcat :points))
;; Invert to get the points minus the transforms applied to the group ;; Invert to get the points minus the transforms applied to the group
base-points (transform-points points shape-center (:transform-inverse group)) base-points (transform-points points shape-center (:transform-inverse group (gmt/matrix)))
;; Defines the new selection rect with its transformations ;; Defines the new selection rect with its transformations
new-points (-> (gpr/points->selrect base-points) new-points (-> (gpr/points->selrect base-points)
(gpr/rect->points) (gpr/rect->points)
(transform-points shape-center (:transform group))) (transform-points shape-center (:transform group (gmt/matrix))))
;; Calculte the new selrect ;; Calculte the new selrect
new-selrect (gpr/points->selrect base-points)] new-selrect (gpr/points->selrect base-points)]

View file

@ -169,7 +169,10 @@
:id (:id group) :id (:id group)
:operations [{:type :set :operations [{:type :set
:attr :masked-group? :attr :masked-group?
:val nil}]})] :val nil}]}
{:type :reg-objects
:page-id page-id
:shapes [(:id group)]})]
(rx/of (dwc/commit-changes rchanges uchanges {:commit-local? true}) (rx/of (dwc/commit-changes rchanges uchanges {:commit-local? true})
(dwc/select-shapes (d/ordered-set (:id group)))))))))) (dwc/select-shapes (d/ordered-set (:id group))))))))))