mirror of
https://github.com/penpot/penpot.git
synced 2025-06-07 17:51:38 +02:00
✨ Migrates model to the new paths
This commit is contained in:
parent
e2593c2dad
commit
f339f1ee98
13 changed files with 114 additions and 82 deletions
|
@ -213,18 +213,3 @@
|
|||
opposite (gpt/add point (gpt/negate phv))]
|
||||
opposite))
|
||||
|
||||
(defn segments->content [segments]
|
||||
(let [initial (first segments)
|
||||
closed? (= (first segments) (last segments))
|
||||
lines (if closed?
|
||||
(take (- (count segments) 2) (rest segments))
|
||||
(rest segments))]
|
||||
|
||||
(d/concat [{:command :move-to
|
||||
:params (select-keys initial [:x :y])}]
|
||||
(->> lines
|
||||
(mapv #(hash-map :command :line-to
|
||||
:params (select-keys % [:x :y]))))
|
||||
|
||||
(when closed?
|
||||
[{:command :close-path}]))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue