mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
Improve performance on icons toolbox rendering.
This commit is contained in:
parent
f19da5da9a
commit
46f35cf742
1 changed files with 5 additions and 5 deletions
|
@ -133,20 +133,20 @@
|
||||||
[:div.tool-window-bar
|
[:div.tool-window-bar
|
||||||
[:div.tool-window-icon i/window]
|
[:div.tool-window-icon i/window]
|
||||||
[:span "Icons"]
|
[:span "Icons"]
|
||||||
[:div.tool-window-close
|
[:div.tool-window-close {:on-click on-close} i/close]]
|
||||||
{:on-click on-close} i/close]]
|
|
||||||
[:div.tool-window-content
|
[:div.tool-window-content
|
||||||
[:div.figures-catalog
|
[:div.figures-catalog
|
||||||
;; extract component: set selector
|
;; extract component: set selector
|
||||||
[:select.input-select.small
|
[:select.input-select.small {:on-change on-change
|
||||||
{:on-change on-change :value collid} ; TODO: maybe missing pr-str
|
:value collid}
|
||||||
(for [icon-coll library/+icon-collections+]
|
(for [icon-coll library/+icon-collections+]
|
||||||
[:option {:key (str "icon-coll" (:id icon-coll))
|
[:option {:key (str "icon-coll" (:id icon-coll))
|
||||||
:value (pr-str (:id icon-coll))}
|
:value (pr-str (:id icon-coll))}
|
||||||
(:name icon-coll)])]]
|
(:name icon-coll)])]]
|
||||||
(for [icon icons
|
(for [icon icons
|
||||||
:let [selected? (= (:drawing workspace) icon)]]
|
:let [selected? (= (:drawing workspace) icon)]]
|
||||||
[:div.figure-btn {:class (when selected? "selected")
|
[:div.figure-btn {:key (str (:id icon))
|
||||||
|
:class (when selected? "selected")
|
||||||
:on-click #(on-select icon)}
|
:on-click #(on-select icon)}
|
||||||
(shapes/render icon)])]])))
|
(shapes/render icon)])]])))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue