mirror of
https://github.com/penpot/penpot.git
synced 2025-02-18 21:06:11 -05:00
✨ Ensure plain map on path params in several functions
This commit is contained in:
parent
2f68310a7c
commit
4ce654511b
1 changed files with 8 additions and 5 deletions
|
@ -30,7 +30,7 @@
|
||||||
(= cur-point handler-c2)
|
(= cur-point handler-c2)
|
||||||
(= pre-point handler-c1))
|
(= pre-point handler-c1))
|
||||||
(assoc content index {:command :line-to
|
(assoc content index {:command :line-to
|
||||||
:params cur-point})
|
:params (into {} cur-point)})
|
||||||
content)))]
|
content)))]
|
||||||
|
|
||||||
(reduce process-command content with-prev)))
|
(reduce process-command content with-prev)))
|
||||||
|
@ -71,10 +71,13 @@
|
||||||
h2 (gpt/add to-p dv2)]
|
h2 (gpt/add to-p dv2)]
|
||||||
(-> cmd
|
(-> cmd
|
||||||
(assoc :command :curve-to)
|
(assoc :command :curve-to)
|
||||||
(assoc-in [:params :c1x] (:x h1))
|
(update :params (fn [params]
|
||||||
(assoc-in [:params :c1y] (:y h1))
|
;; ensure plain map
|
||||||
(assoc-in [:params :c2x] (:x h2))
|
(-> (into {} params)
|
||||||
(assoc-in [:params :c2y] (:y h2)))))
|
(assoc :c1x (:x h1))
|
||||||
|
(assoc :c1y (:y h1))
|
||||||
|
(assoc :c2x (:x h2))
|
||||||
|
(assoc :c2y (:y h2))))))))
|
||||||
|
|
||||||
(defn is-curve?
|
(defn is-curve?
|
||||||
[content point]
|
[content point]
|
||||||
|
|
Loading…
Add table
Reference in a new issue