From 4db34a969d8a41b7328b3a90baefc4a689741935 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 28 Apr 2024 17:14:56 +0300 Subject: [PATCH] Fix spline not updating when controlpoint is on and edge --- web/js/spline_editor.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/web/js/spline_editor.js b/web/js/spline_editor.js index d320e85..b8e0bc6 100644 --- a/web/js/spline_editor.js +++ b/web/js/spline_editor.js @@ -371,11 +371,6 @@ function createSplineEditor(context, reset=false) { context.contextMenu.style.top = `${pv.event.clientY}px`; } }) - .event("mouseup", function() { - if (this.pathElements !== null) { - updatePath(); - } - }); vis.add(pv.Rule) .data(pv.range(0, 8, .5)) @@ -416,6 +411,9 @@ function createSplineEditor(context, reset=false) { return this; }) .event("dragend", function() { + if (this.pathElements !== null) { + updatePath(); + } isDragging = false; }) .event("drag", vis)