www.spaceplanner.app

Web client to the spaceplanner API
git clone git://jacobedwards.org/www.spaceplanner.app
Log | Files | Refs

commit bceff7399772d3490065fc3144015be56e39366f
parent 4f8f9685ed478acce7ef66927d9bcb97152e9abf
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Wed,  9 Oct 2024 18:37:23 -0700

Fix furniture moving bug

When you wanted to make fine-tuned adjustments it would be impossible
without first moving it away from the origin, then moving it back
due to the move threshold. The threshold is still in place now, but
it's disabled once you exceed it once.

Diffstat:
Mfiles/floorplans/floorplan/main.js | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js @@ -851,9 +851,10 @@ function furnitureHandler(ev, editor, state) { } if (ev.type === "pointermove" && primaryMove(ev)) { - if (press.distanceTo(state.origin) < params.threshold) { + if (!state.moved && press.distanceTo(state.origin) < params.threshold) { return } + state.moved = true handled(ev) if (state.move) { state.move = press