mirror of
https://github.com/penpot/penpot.git
synced 2025-03-12 07:41:43 -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
|
(assoc :modifiers
|
||||||
(rotation-modifiers gcenter % (- (:rotation group 0))))
|
(rotation-modifiers gcenter % (- (:rotation group 0))))
|
||||||
(geom/transform-shape))))
|
(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))]
|
(geom/selection-rect))]
|
||||||
|
|
||||||
;; Rotate the group shape change the data and rotate back again
|
;; Rotate the group shape change the data and rotate back again
|
||||||
|
|
|
@ -1450,13 +1450,16 @@
|
||||||
[(first shapes) [] []]
|
[(first shapes) [] []]
|
||||||
(dws/prepare-create-group page-id shapes "Group-" true))
|
(dws/prepare-create-group page-id shapes "Group-" true))
|
||||||
|
|
||||||
rchanges (conj rchanges
|
rchanges (d/concat rchanges
|
||||||
{:type :mod-obj
|
[{:type :mod-obj
|
||||||
:page-id page-id
|
:page-id page-id
|
||||||
:id (:id group)
|
:id (:id group)
|
||||||
:operations [{:type :set
|
:operations [{:type :set
|
||||||
:attr :masked-group?
|
:attr :masked-group?
|
||||||
:val true}]})
|
:val true}]}
|
||||||
|
{:type :reg-objects
|
||||||
|
:page-id page-id
|
||||||
|
:shapes [(:id group)]}])
|
||||||
|
|
||||||
uchanges (conj rchanges
|
uchanges (conj rchanges
|
||||||
{:type :mod-obj
|
{:type :mod-obj
|
||||||
|
|
Loading…
Add table
Reference in a new issue