From 46f35cf7425e7e2f5cda5a7de6e52447b8153591 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sat, 2 Jan 2016 17:33:53 +0200 Subject: [PATCH] Improve performance on icons toolbox rendering. --- frontend/uxbox/ui/workspace/toolboxes.cljs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/uxbox/ui/workspace/toolboxes.cljs b/frontend/uxbox/ui/workspace/toolboxes.cljs index 842b16bea..aca2dcc63 100644 --- a/frontend/uxbox/ui/workspace/toolboxes.cljs +++ b/frontend/uxbox/ui/workspace/toolboxes.cljs @@ -133,20 +133,20 @@ [:div.tool-window-bar [:div.tool-window-icon i/window] [:span "Icons"] - [:div.tool-window-close - {:on-click on-close} i/close]] + [:div.tool-window-close {:on-click on-close} i/close]] [:div.tool-window-content [:div.figures-catalog ;; extract component: set selector - [:select.input-select.small - {:on-change on-change :value collid} ; TODO: maybe missing pr-str + [:select.input-select.small {:on-change on-change + :value collid} (for [icon-coll library/+icon-collections+] [:option {:key (str "icon-coll" (:id icon-coll)) :value (pr-str (:id icon-coll))} (:name icon-coll)])]] (for [icon icons :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)} (shapes/render icon)])]])))