Merge pull request #6531 from mdbenito/fix/choppy-closest-point

 Fix choppy behaviour of new node on path
This commit is contained in:
Andrey Antukh 2025-05-22 13:24:04 +02:00 committed by GitHub
commit df27db1996
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 47 deletions

View file

@ -348,7 +348,7 @@
ms/mouse-position
(mf/deps base-content zoom)
(fn [position]
(when-let [point (path.segment/closest-point base-content position)]
(when-let [point (path.segment/closest-point base-content position (/ 0.01 zoom))]
(reset! hover-point (when (< (gpt/distance position point) (/ 10 zoom)) point)))))
[:g.path-editor {:ref editor-ref}