mirror of
https://github.com/penpot/penpot.git
synced 2025-03-11 23:31:21 -05:00
✨ Make selection rect only for the mask shape
This commit is contained in:
parent
b2ec9aa83a
commit
0ddf6d30b8
2 changed files with 14 additions and 8 deletions
|
@ -736,7 +736,10 @@
|
|||
(assoc :modifiers
|
||||
(rotation-modifiers gcenter % (- (:rotation group 0))))
|
||||
(geom/transform-shape))))
|
||||
selrect (-> (into [] gxfm (:shapes group))
|
||||
inner-shapes (if (:masked-group? group)
|
||||
[(first (:shapes group))]
|
||||
(:shapes group))
|
||||
selrect (-> (into [] gxfm inner-shapes)
|
||||
(geom/selection-rect))]
|
||||
|
||||
;; Rotate the group shape change the data and rotate back again
|
||||
|
|
|
@ -1450,13 +1450,16 @@
|
|||
[(first shapes) [] []]
|
||||
(dws/prepare-create-group page-id shapes "Group-" true))
|
||||
|
||||
rchanges (conj rchanges
|
||||
{:type :mod-obj
|
||||
:page-id page-id
|
||||
:id (:id group)
|
||||
:operations [{:type :set
|
||||
:attr :masked-group?
|
||||
:val true}]})
|
||||
rchanges (d/concat rchanges
|
||||
[{:type :mod-obj
|
||||
:page-id page-id
|
||||
:id (:id group)
|
||||
:operations [{:type :set
|
||||
:attr :masked-group?
|
||||
:val true}]}
|
||||
{:type :reg-objects
|
||||
:page-id page-id
|
||||
:shapes [(:id group)]}])
|
||||
|
||||
uchanges (conj rchanges
|
||||
{:type :mod-obj
|
||||
|
|
Loading…
Add table
Reference in a new issue