mirror of
https://github.com/penpot/penpot.git
synced 2025-04-16 08:51:32 -05:00
Cosmetic fixes on zoom related events.
This commit is contained in:
parent
c743c94450
commit
49d2c54488
1 changed files with 6 additions and 2 deletions
|
@ -140,7 +140,9 @@
|
|||
(defrecord IncreaseZoom []
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(let [increase #(nth zoom-levels (+ (index-of zoom-levels %) 1) (last zoom-levels))]
|
||||
(let [increase #(nth zoom-levels
|
||||
(+ (index-of zoom-levels %) 1)
|
||||
(last zoom-levels))]
|
||||
(update-in state [:workspace :zoom] (fnil increase 1)))))
|
||||
|
||||
(defn increase-zoom
|
||||
|
@ -152,7 +154,9 @@
|
|||
(defrecord DecreaseZoom []
|
||||
rs/UpdateEvent
|
||||
(-apply-update [_ state]
|
||||
(let [decrease #(nth zoom-levels (- (index-of zoom-levels %) 1) (first zoom-levels))]
|
||||
(let [decrease #(nth zoom-levels
|
||||
(- (index-of zoom-levels %) 1)
|
||||
(first zoom-levels))]
|
||||
(update-in state [:workspace :zoom] (fnil decrease 1)))))
|
||||
|
||||
(defn decrease-zoom
|
||||
|
|
Loading…
Add table
Reference in a new issue