mirror of
https://github.com/penpot/penpot.git
synced 2026-07-30 09:56:22 +00:00
💄 Add cosmetic improvements to some workspace frame related components
This commit is contained in:
parent
ca8e9b871d
commit
2e2ce6bcfe
@ -78,15 +78,17 @@
|
|||||||
::mf/wrap-props false}
|
::mf/wrap-props false}
|
||||||
[props]
|
[props]
|
||||||
(let [shape (unchecked-get props "shape")
|
(let [shape (unchecked-get props "shape")
|
||||||
frame-id (:id shape)
|
|
||||||
objects (wsh/lookup-page-objects @st/state)
|
objects (wsh/lookup-page-objects @st/state)
|
||||||
|
|
||||||
|
frame-id (dm/get-prop shape :id)
|
||||||
|
|
||||||
node-ref (mf/use-ref nil)
|
node-ref (mf/use-ref nil)
|
||||||
modifiers-ref (mf/use-memo (mf/deps frame-id) #(refs/workspace-modifiers-by-frame-id frame-id))
|
modifiers* (mf/with-memo [frame-id]
|
||||||
modifiers (mf/deref modifiers-ref)]
|
(refs/workspace-modifiers-by-frame-id frame-id))
|
||||||
|
modifiers (mf/deref modifiers*)]
|
||||||
|
|
||||||
(fdm/use-dynamic-modifiers objects (mf/ref-val node-ref) modifiers)
|
(fdm/use-dynamic-modifiers objects (mf/ref-val node-ref) modifiers)
|
||||||
(let [shape (unchecked-get props "shape")]
|
[:& frame-shape {:shape shape :ref node-ref}]))))
|
||||||
[:& frame-shape {:shape shape :ref node-ref}])))))
|
|
||||||
|
|
||||||
|
|
||||||
(defn root-frame-wrapper-factory
|
(defn root-frame-wrapper-factory
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user