mirror of
https://github.com/penpot/penpot.git
synced 2025-07-22 23:27:17 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
d685888720
48 changed files with 328 additions and 263 deletions
|
@ -112,20 +112,25 @@
|
|||
(update command :params assoc :x x :y y))
|
||||
|
||||
(defn format-path [content]
|
||||
(let [result (make-array (count content))]
|
||||
(reduce (fn [last-move current]
|
||||
(let [point (upc/command->point current)
|
||||
current-move? (= :move-to (:command current))
|
||||
last-move (if current-move? point last-move)]
|
||||
(try
|
||||
(let [result (make-array (count content))]
|
||||
(reduce (fn [last-move current]
|
||||
(let [point (upc/command->point current)
|
||||
current-move? (= :move-to (:command current))
|
||||
last-move (if current-move? point last-move)]
|
||||
|
||||
(if (and (not current-move?) (pt= last-move point))
|
||||
(arr/conj! result (command->string (set-point current last-move)))
|
||||
(arr/conj! result (command->string current)))
|
||||
(if (and (not current-move?) (pt= last-move point))
|
||||
(arr/conj! result (command->string (set-point current last-move)))
|
||||
(arr/conj! result (command->string current)))
|
||||
|
||||
(when (and (not current-move?) (pt= last-move point))
|
||||
(arr/conj! result "Z"))
|
||||
(when (and (not current-move?) (pt= last-move point))
|
||||
(arr/conj! result "Z"))
|
||||
|
||||
last-move))
|
||||
nil
|
||||
content)
|
||||
(.join ^js result "")))
|
||||
last-move))
|
||||
nil
|
||||
content)
|
||||
(.join ^js result ""))
|
||||
|
||||
(catch :default err
|
||||
(.error js/console err)
|
||||
nil)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue