mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 10:38:13 -05:00
Temporary hack on groups of groups
This commit is contained in:
parent
fed684c058
commit
bdf476e297
1 changed files with 10 additions and 6 deletions
|
@ -202,11 +202,14 @@
|
||||||
selected? (contains? selected (:id item))
|
selected? (contains? selected (:id item))
|
||||||
collapsed? (:collapsed item true)
|
collapsed? (:collapsed item true)
|
||||||
shapes-map (mx/react wb/shapes-by-id-ref)
|
shapes-map (mx/react wb/shapes-by-id-ref)
|
||||||
classes (classnames
|
;; TODO: Fix this temporary hack (Looks like a problem in defcs macro)
|
||||||
:selected selected?
|
classes (if (nil? own)
|
||||||
:drag-top (= :top (:over @local))
|
(classnames :selected selected?)
|
||||||
:drag-bottom (= :bottom (:over @local))
|
(classnames
|
||||||
:drag-inside (= :middle (:over @local)))
|
:selected selected?
|
||||||
|
:drag-top (= :top (:over @local))
|
||||||
|
:drag-bottom (= :bottom (:over @local))
|
||||||
|
:drag-inside (= :middle (:over @local))))
|
||||||
select #(select-shape selected item %)
|
select #(select-shape selected item %)
|
||||||
toggle-visibility #(toggle-visibility selected item %)
|
toggle-visibility #(toggle-visibility selected item %)
|
||||||
toggle-blocking #(toggle-blocking item %)]
|
toggle-blocking #(toggle-blocking item %)]
|
||||||
|
@ -280,7 +283,8 @@
|
||||||
(for [shape (map #(get shapes-map %) (:items item))
|
(for [shape (map #(get shapes-map %) (:items item))
|
||||||
:let [key (str (:id shape))]]
|
:let [key (str (:id shape))]]
|
||||||
(if (= (:type shape) :group)
|
(if (= (:type shape) :group)
|
||||||
(-> (layer-group shape selected)
|
;; TODO: Fix this temporary hack (Looks like a problem in defcs macro)
|
||||||
|
(-> (layer-group nil shape selected)
|
||||||
(mx/with-key key))
|
(mx/with-key key))
|
||||||
(-> (layer-simple shape selected)
|
(-> (layer-simple shape selected)
|
||||||
(mx/with-key key))))])])))
|
(mx/with-key key))))])])))
|
||||||
|
|
Loading…
Add table
Reference in a new issue