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:
parent
18ddbaa039
commit
52d3b2c7fc
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue