mirror of
https://github.com/penpot/penpot.git
synced 2025-08-02 15:18:24 +02:00
🐛 Fixed problem with zoom and with value = 0
This commit is contained in:
parent
d17c6d8fce
commit
cd151db5ee
5 changed files with 28 additions and 15 deletions
|
@ -660,17 +660,18 @@
|
|||
;; Normalize x/y vector coordinates because scale by 0 is infinite
|
||||
res-x (cond
|
||||
(and (< res-x 0) (> res-x -0.01)) -0.01
|
||||
(and (> res-x 0) (< res-x 0.01)) 0.01
|
||||
(and (>= res-x 0) (< res-x 0.01)) 0.01
|
||||
:else res-x)
|
||||
|
||||
res-y (cond
|
||||
(and (< res-y 0) (> res-y -0.01)) -0.01
|
||||
(and (> res-y 0) (< res-y 0.01)) 0.01
|
||||
(and (>= res-y 0) (< res-y 0.01)) 0.01
|
||||
:else res-y)
|
||||
|
||||
resize (gpt/point res-x res-y)
|
||||
|
||||
origin (:resize-origin modifiers (gpt/point 0 0))
|
||||
|
||||
resize-transform (:resize-transform modifiers (gmt/matrix))
|
||||
resize-transform-inverse (:resize-transform-inverse modifiers (gmt/matrix))
|
||||
rt-modif (:rotation modifiers 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue