0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-18 10:41:29 -05:00

🎉 Add zoom to shape on double click upon its icon in navigation pane

Signed-off-by: Andrei Zhurau <zhurov.andrew@gmail.com>
This commit is contained in:
Andrew Zhurov 2022-07-27 13:41:20 +03:00
parent 1174502cb8
commit 98402ae1db

View file

@ -218,7 +218,10 @@
:icon-layer (= (:type item) :icon))
:on-click select-shape
:on-double-click #(dom/stop-propagation %)}
[:& si/element-icon {:shape item}]
[:div {:on-double-click #(do (dom/stop-propagation %)
(dom/prevent-default %)
(st/emit! dw/zoom-to-selected-shape))}
[:& si/element-icon {:shape item}]]
[:& layer-name {:shape item
:name-ref ref
:on-start-edit #(reset! disable-drag true)