Make precision closest point computation depend on zoom

This commit is contained in:
Miguel de Benito Delgado 2025-05-21 21:29:40 +02:00
parent a2ac2bc6c6
commit e4f2dfaa11
2 changed files with 8 additions and 9 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}