mirror of
https://github.com/penpot/penpot.git
synced 2025-08-04 09:38:23 +02:00
🐛 Fix problem with SVG and flex layout
This commit is contained in:
parent
a98ae69a03
commit
6e78745ed5
2 changed files with 5 additions and 2 deletions
|
@ -318,8 +318,10 @@
|
|||
(defn unit
|
||||
[p1]
|
||||
(let [p-length (length p1)]
|
||||
(Point. (/ (dm/get-prop p1 :x) p-length)
|
||||
(/ (dm/get-prop p1 :y) p-length))))
|
||||
(if (mth/almost-zero? p-length)
|
||||
(Point. 0 0)
|
||||
(Point. (/ (dm/get-prop p1 :x) p-length)
|
||||
(/ (dm/get-prop p1 :y) p-length)))))
|
||||
|
||||
(defn perpendicular
|
||||
[pt]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue