From 574e8a92a8d461a2d5796cc9650b2a88f42f49f8 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Fri, 11 Dec 2020 08:27:51 +0100 Subject: [PATCH] :bug: Fixed problem with groups --- common/app/common/geom/shapes/transforms.cljc | 4 ++-- frontend/src/app/main/data/workspace/groups.cljs | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common/app/common/geom/shapes/transforms.cljc b/common/app/common/geom/shapes/transforms.cljc index 2def83afa..0430f0ea2 100644 --- a/common/app/common/geom/shapes/transforms.cljc +++ b/common/app/common/geom/shapes/transforms.cljc @@ -270,12 +270,12 @@ points (->> children (mapcat :points)) ;; 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 new-points (-> (gpr/points->selrect base-points) (gpr/rect->points) - (transform-points shape-center (:transform group))) + (transform-points shape-center (:transform group (gmt/matrix)))) ;; Calculte the new selrect new-selrect (gpr/points->selrect base-points)] diff --git a/frontend/src/app/main/data/workspace/groups.cljs b/frontend/src/app/main/data/workspace/groups.cljs index 91d1e32e8..fe79a6c07 100644 --- a/frontend/src/app/main/data/workspace/groups.cljs +++ b/frontend/src/app/main/data/workspace/groups.cljs @@ -169,7 +169,10 @@ :id (:id group) :operations [{:type :set :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}) (dwc/select-shapes (d/ordered-set (:id group))))))))))