mirror of
https://github.com/penpot/penpot.git
synced 2025-07-14 11:47:16 +02:00
Fix group rendering.
Bug introduced in previous refactor of shapes rendering.
This commit is contained in:
parent
1a8e29a0b1
commit
b6bcc1795c
1 changed files with 9 additions and 7 deletions
|
@ -45,7 +45,8 @@
|
||||||
on-mouse-down #(common/on-mouse-down % shape selected)
|
on-mouse-down #(common/on-mouse-down % shape selected)
|
||||||
on-mouse-up #(common/on-mouse-up % shape)]
|
on-mouse-up #(common/on-mouse-up % shape)]
|
||||||
(html
|
(html
|
||||||
[:g.shape {:class (when selected? "selected")
|
[:g.shape.group-shape
|
||||||
|
{:class (when selected? "selected")
|
||||||
:on-mouse-down on-mouse-down
|
:on-mouse-down on-mouse-down
|
||||||
:on-mouse-up on-mouse-up}
|
:on-mouse-up on-mouse-up}
|
||||||
(group-shape shape render-component)])))
|
(group-shape shape render-component)])))
|
||||||
|
@ -68,12 +69,13 @@
|
||||||
shapes-by-id (get @st/state :shapes-by-id)
|
shapes-by-id (get @st/state :shapes-by-id)
|
||||||
xf (comp
|
xf (comp
|
||||||
(map #(get shapes-by-id %))
|
(map #(get shapes-by-id %))
|
||||||
(remove :hidden)
|
(remove :hidden))]
|
||||||
(map factory))]
|
|
||||||
(html
|
(html
|
||||||
[:g attrs
|
[:g attrs
|
||||||
(for [item (reverse (into [] xf items))]
|
(for [item (reverse (into [] xf items))
|
||||||
(rum/with-key item (str (:id item))))])))
|
:let [key (str (:id item))]]
|
||||||
|
(-> (factory item)
|
||||||
|
(rum/with-key key)))])))
|
||||||
|
|
||||||
(def group-shape
|
(def group-shape
|
||||||
(mx/component
|
(mx/component
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue