diff --git a/CHANGES.md b/CHANGES.md index c0959056d..f80641dda 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -42,6 +42,7 @@ - Fix bug with transformation operations [Taiga #2155](https://tree.taiga.io/project/penpot/issue/2155). - Fix bug in firefox when a text box is inside a mask [Taiga #2152](https://tree.taiga.io/project/penpot/issue/2152). - Fix problem with stroke inside/outside [Taiga #2186](https://tree.taiga.io/project/penpot/issue/2186) +- Fix masks export area [Taiga #2189](https://tree.taiga.io/project/penpot/issue/2189) - Fix paste in place in arboards [Taiga #2188](https://tree.taiga.io/project/penpot/issue/2188) - Fix stroke cut on shapes export [Taiga #2171](https://tree.taiga.io/project/penpot/issue/2171) diff --git a/frontend/src/app/main/ui/render.cljs b/frontend/src/app/main/ui/render.cljs index a0a3b81dc..0263a4826 100644 --- a/frontend/src/app/main/ui/render.cljs +++ b/frontend/src/app/main/ui/render.cljs @@ -37,11 +37,17 @@ (update :width + (* 2 padding)) (update :height + (* 2 padding)))] - (if (= :group (:type object)) + (cond + (and (= :group (:type object)) + (:masked-group? object)) + (calc-bounds (get objects (first (:shapes object))) objects) + + (= :group (:type object)) (->> (:shapes object) (into [obj-bounds] xf-get-bounds) (gsh/join-rects)) + :else obj-bounds))) (mf/defc object-svg