mirror of
https://github.com/penpot/penpot.git
synced 2026-08-01 10:56:20 +00:00
✨ Deferred components rendering
This commit is contained in:
parent
464c19bf39
commit
4ee6c278d9
@ -19,6 +19,7 @@
|
|||||||
[app.common.geom.align :as gal]
|
[app.common.geom.align :as gal]
|
||||||
[app.common.geom.point :as gpt]
|
[app.common.geom.point :as gpt]
|
||||||
[app.common.geom.matrix :as gmt]
|
[app.common.geom.matrix :as gmt]
|
||||||
|
[app.util.timers :as ts]
|
||||||
[app.main.ui.shapes.filters :as filters]
|
[app.main.ui.shapes.filters :as filters]
|
||||||
[app.main.ui.shapes.frame :as frame]
|
[app.main.ui.shapes.frame :as frame]
|
||||||
[app.main.ui.shapes.circle :as circle]
|
[app.main.ui.shapes.circle :as circle]
|
||||||
@ -185,7 +186,8 @@
|
|||||||
[:& wrapper {:shape frame :view-box vbox}]]))
|
[:& wrapper {:shape frame :view-box vbox}]]))
|
||||||
|
|
||||||
(mf/defc component-svg
|
(mf/defc component-svg
|
||||||
{::mf/wrap [mf/memo]}
|
{::mf/wrap [mf/memo
|
||||||
|
#(mf/deferred % ts/idle-then-raf)]}
|
||||||
[{:keys [objects group zoom] :or {zoom 1} :as props}]
|
[{:keys [objects group zoom] :or {zoom 1} :as props}]
|
||||||
(let [modifier (-> (gpt/point (:x group) (:y group))
|
(let [modifier (-> (gpt/point (:x group) (:y group))
|
||||||
(gpt/negate)
|
(gpt/negate)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user