From 116b91bee1a557a948f1c24c6003deea83e76c0f Mon Sep 17 00:00:00 2001 From: Robin Schreiber Date: Thu, 13 Mar 2025 17:30:39 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=BC:=20always=20use=20evt.position=20a?= =?UTF-8?q?s=20drag=20reference=20for=20custom=20drag?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit For very fast successive drags, the start position tended to be an outdated value. Using position at any time fixes that issue. --- lively.halos/morph.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lively.halos/morph.js b/lively.halos/morph.js index b81d198425..9760120de5 100644 --- a/lively.halos/morph.js +++ b/lively.halos/morph.js @@ -2263,13 +2263,14 @@ export default class Halo extends Morph { onDragStart (evt) { this.dragHalo().init(); - this._lastDragPos = evt.startPosition; + this._lastDragPos = evt.position; } onDrag (evt) { if (!this.world()) return; this.dragHalo().update(evt.state.dragDelta); this.dragHalo().visible = false; + this._lastDragPos = evt.position; } onDragEnd (evt) {