mirror of
https://github.com/penpot/penpot.git
synced 2025-05-19 18:06:12 +02:00
🐛 Fixed problem when editing paths
This commit is contained in:
parent
19ed0b70c2
commit
cbdfb4349b
2 changed files with 4 additions and 3 deletions
|
@ -692,8 +692,8 @@
|
||||||
point (-> content (get (if (= prefix :c1) (dec index) index)) (ugp/command->point))
|
point (-> content (get (if (= prefix :c1) (dec index) index)) (ugp/command->point))
|
||||||
handler (-> content (get index) (ugp/get-handler prefix))
|
handler (-> content (get index) (ugp/get-handler prefix))
|
||||||
|
|
||||||
current-distance (gpt/distance (ugp/opposite-handler point handler) opposite-handler)
|
current-distance (when opposite-handler (gpt/distance (ugp/opposite-handler point handler) opposite-handler))
|
||||||
match-opposite? (mth/almost-zero? current-distance)]
|
match-opposite? (and opposite-handler (mth/almost-zero? current-distance))]
|
||||||
|
|
||||||
(drag-stream
|
(drag-stream
|
||||||
(rx/concat
|
(rx/concat
|
||||||
|
|
|
@ -289,7 +289,8 @@
|
||||||
(:c2x params) (update-in [index :params :c2x] + (:c2x params))
|
(:c2x params) (update-in [index :params :c2x] + (:c2x params))
|
||||||
(:c2y params) (update-in [index :params :c2y] + (:c2y params)))
|
(:c2y params) (update-in [index :params :c2y] + (:c2y params)))
|
||||||
content))]
|
content))]
|
||||||
(reduce apply-to-index content modifiers)))
|
(let [content (if (vector? content) content (into [] content))]
|
||||||
|
(reduce apply-to-index content modifiers))))
|
||||||
|
|
||||||
(defn command->point [command]
|
(defn command->point [command]
|
||||||
(when-not (nil? command)
|
(when-not (nil? command)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue