mirror of
https://github.com/penpot/penpot.git
synced 2025-02-03 04:49:03 -05:00
💄 Add cosmetic improvements to some workspace frame related components
This commit is contained in:
parent
ca8e9b871d
commit
2e2ce6bcfe
1 changed files with 10 additions and 8 deletions
|
@ -77,16 +77,18 @@
|
|||
{::mf/wrap [#(mf/memo' % check-props)]
|
||||
::mf/wrap-props false}
|
||||
[props]
|
||||
(let [shape (unchecked-get props "shape")
|
||||
frame-id (:id shape)
|
||||
objects (wsh/lookup-page-objects @st/state)
|
||||
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/deref modifiers-ref)]
|
||||
(let [shape (unchecked-get props "shape")
|
||||
objects (wsh/lookup-page-objects @st/state)
|
||||
|
||||
frame-id (dm/get-prop shape :id)
|
||||
|
||||
node-ref (mf/use-ref nil)
|
||||
modifiers* (mf/with-memo [frame-id]
|
||||
(refs/workspace-modifiers-by-frame-id frame-id))
|
||||
modifiers (mf/deref 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
|
||||
|
|
Loading…
Add table
Reference in a new issue