From 4f88d404d668ac67b68b37df6085ff6da35549ce Mon Sep 17 00:00:00 2001 From: Ladd Date: Sat, 27 Dec 2025 12:13:29 -0600 Subject: [PATCH] fixed panning bug --- pointer.js | 3 ++- simulator.js | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pointer.js b/pointer.js index 5b3e9eb..d1519f6 100644 --- a/pointer.js +++ b/pointer.js @@ -120,6 +120,7 @@ export class Pointer { } handlePointerDown({x: clientX, y: clientY}) { + this.updatePointer({x: clientX, y: clientY}); if (this.sim.isCurrentMode(MODE_MASS_GENERATION)) { const {x, y} = this.sim.screenToSim(clientX, clientY) this.sim.objects.handlePointerDown({x, y}); @@ -130,7 +131,7 @@ export class Pointer { viewOriginStart: this.sim.display.viewOrigin, pointerStart: {x: clientX, y: clientY}, pointerCurrent: {x: clientX, y: clientY}, - velocity: this.getPointerVelocity(), + velocity: {x: 0, y: 0}, }; } } diff --git a/simulator.js b/simulator.js index 695a1e7..2447723 100644 --- a/simulator.js +++ b/simulator.js @@ -72,7 +72,6 @@ export class Sim { this.pointer.clearPointerHistory(); if (this.pointer.panning) { this.pointer.panning = undefined; - // TODO: Maybe show velocity vectors relative to view velocity } }