0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-09 16:30:37 -05:00

Minor fix on ruler ctrl mode.

This commit is contained in:
Andrey Antukh 2016-01-31 17:38:57 +02:00
parent bafc486401
commit e727c124c7

View file

@ -67,8 +67,8 @@
(letfn [(on-value [[[x y :as pos] ctrl?]]
(if ctrl?
(let [[sx sy] (:pos1 @local)
dx (- x sx)
dy (- y sy)]
dx (mth/abs (- x sx))
dy (mth/abs (- y sy))]
(cond
(> dx dy) (swap! local assoc :pos2 [x sy])
(> dy dx) (swap! local assoc :pos2 [sx y])