0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-15 09:11:21 -05:00

Merge pull request #8 from uxbox/header-zoom-controller

Zoom control widget on the workspace header
This commit is contained in:
Andrey Antukh 2016-04-11 18:12:50 +03:00
commit 20ae512143

View file

@ -33,7 +33,9 @@
(let [zoom (rum/react wb/zoom-l)
coords (some-> (rum/react wb/mouse-canvas-a)
(gpt/divide zoom)
(gpt/round 1))]
(gpt/round 1))
increase #(rs/emit! (dw/increase-zoom))
decrease #(rs/emit! (dw/decrease-zoom))]
(html
[:ul.options-view
[:li.coordinates {:alt "x"}
@ -41,9 +43,9 @@
[:li.coordinates {:alt "y"}
(str "Y: " (:y coords "-"))]
[:li.zoom-input
[:span.add-zoom "+"]
[:span "100%"]
[:span.remove-zoom "-"]]])))
[:span.add-zoom {:on-click increase} "+"]
[:span (str (mth/round (* 100 zoom)) "%")]
[:span.remove-zoom {:on-click decrease} "-"]]])))
(def coordinates
(mx/component