mirror of
https://github.com/penpot/penpot.git
synced 2025-07-31 23:58:32 +02:00
⚡ Add micro optimization to shape-container component
This commit is contained in:
parent
b158a82a84
commit
d0a796124f
1 changed files with 2 additions and 2 deletions
|
@ -54,7 +54,7 @@
|
||||||
children (unchecked-get props "children")
|
children (unchecked-get props "children")
|
||||||
pointer-events (unchecked-get props "pointer-events")
|
pointer-events (unchecked-get props "pointer-events")
|
||||||
disable-shadows? (unchecked-get props "disable-shadows?")
|
disable-shadows? (unchecked-get props "disable-shadows?")
|
||||||
shape-id (:id shape)
|
shape-id (dm/get-prop shape :id)
|
||||||
|
|
||||||
preview-blend-mode-ref
|
preview-blend-mode-ref
|
||||||
(mf/with-memo [shape-id] (refs/workspace-preview-blend-by-id shape-id))
|
(mf/with-memo [shape-id] (refs/workspace-preview-blend-by-id shape-id))
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
blend-mode (-> (mf/deref preview-blend-mode-ref)
|
blend-mode (-> (mf/deref preview-blend-mode-ref)
|
||||||
(or (:blend-mode shape)))
|
(or (:blend-mode shape)))
|
||||||
|
|
||||||
type (:type shape)
|
type (dm/get-prop shape :type)
|
||||||
render-id (mf/use-id)
|
render-id (mf/use-id)
|
||||||
filter-id (dm/str "filter_" render-id)
|
filter-id (dm/str "filter_" render-id)
|
||||||
styles (-> (obj/create)
|
styles (-> (obj/create)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue