From 0c8678eb870fcb1147721421376905edee5ac0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eero=20Pitk=C3=A4nen?= Date: Thu, 10 Oct 2024 10:09:53 +0300 Subject: [PATCH] :bug: Fix dragging path points by returning closest point instead of only the distance --- frontend/src/app/main/data/workspace/path/edition.cljs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/main/data/workspace/path/edition.cljs b/frontend/src/app/main/data/workspace/path/edition.cljs index a91532b0a..36af8c593 100644 --- a/frontend/src/app/main/data/workspace/path/edition.cljs +++ b/frontend/src/app/main/data/workspace/path/edition.cljs @@ -160,7 +160,7 @@ selected-points (dm/get-in state [:workspace-local :edit-path id :selected-points] #{}) - start-position (apply min #(gpt/distance start-position %) selected-points) + start-position (apply min-key #(gpt/distance start-position %) selected-points) content (st/get-path state :content) points (upg/content->points content)]