0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-23 23:18:48 -05:00

The zoom change is relative to the current zoom (#5)

This commit is contained in:
Jesús Espino 2016-04-09 22:06:24 +02:00 committed by Andrey Antukh
parent 18ddbaa039
commit 52d3b2c7fc

View file

@ -249,7 +249,7 @@
(defrecord IncreaseZoom []
rs/UpdateEvent
(-apply-update [_ state]
(let [increase #(+ % 0.1)]
(let [increase #(* % 1.05)]
(update-in state [:workspace :zoom] (fnil increase 1)))))
(defn increase-zoom
@ -261,7 +261,7 @@
(defrecord DecreaseZoom []
rs/UpdateEvent
(-apply-update [_ state]
(let [decrease #(if (> % 0) (- % 0.1) 0)]
(let [decrease #(* % 0.95)]
(update-in state [:workspace :zoom] (fnil decrease 1)))))
(defn decrease-zoom