mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 08:17:26 +02:00
Improve performance related to workspace rendering when icon toolboxes is open.
This commit is contained in:
parent
6edc5e07ee
commit
abc743a08e
6 changed files with 51 additions and 25 deletions
|
@ -19,7 +19,7 @@
|
|||
|
||||
(defn lateralmenu-render
|
||||
[own]
|
||||
(let [workspace (rum/react wb/workspace-state)
|
||||
(let [toolboxes (rum/react wb/active-toolboxes-state)
|
||||
toggle #(rs/emit! (dw/toggle-toolbox %))]
|
||||
(html
|
||||
[:div#tool-bar.tool-bar
|
||||
|
@ -27,17 +27,17 @@
|
|||
[:ul.main-tools
|
||||
[:li.tooltip
|
||||
{:alt "Shapes (Ctrl + Shift + F)"
|
||||
:class (when (:draw-toolbox-enabled workspace false) "current")
|
||||
:class (when (contains? toolboxes :draw) "current")
|
||||
:on-click (partial toggle :draw)}
|
||||
i/shapes]
|
||||
[:li.tooltip
|
||||
{:alt "Icons (Ctrl + Shift + I)"
|
||||
:class (when (:icons-toolbox-enabled workspace false) "current")
|
||||
:class (when (contains? toolboxes :icons) "current")
|
||||
:on-click (partial toggle :icons)}
|
||||
i/icon-set]
|
||||
[:li.tooltip
|
||||
{:alt "Elements (Ctrl + Shift + L)"
|
||||
:class (when (:layers-toolbox-enabled workspace false) "current")
|
||||
:class (when (contains? toolboxes :layers) "current")
|
||||
:on-click (partial toggle :layers)}
|
||||
i/layers]
|
||||
[:li.tooltip
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue