mirror of
https://github.com/penpot/penpot.git
synced 2025-06-30 17:56:59 +02: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:
parent
1174502cb8
commit
98402ae1db
1 changed files with 4 additions and 1 deletions
|
@ -218,7 +218,10 @@
|
||||||
:icon-layer (= (:type item) :icon))
|
:icon-layer (= (:type item) :icon))
|
||||||
:on-click select-shape
|
:on-click select-shape
|
||||||
:on-double-click #(dom/stop-propagation %)}
|
: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
|
[:& layer-name {:shape item
|
||||||
:name-ref ref
|
:name-ref ref
|
||||||
:on-start-edit #(reset! disable-drag true)
|
:on-start-edit #(reset! disable-drag true)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue