commit 39936cf641b86cd24236d792d963db4638296269
parent e069ce24f130788bc637d047b2628549915aba6f
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Thu, 31 Oct 2024 11:58:20 -0700
Add notMoveRadius parameter
This parameter (that I wish I could think of a better name for) is
the largest distance the pointer can travel without being treated
as having moved.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js
@@ -19,6 +19,7 @@ const buttons = {
const params = {
longpress: 350,
+ notMoveRadius: 20,
threshold: 400
}
@@ -1151,7 +1152,7 @@ function addFurnitureHandler(ev, editor, state) {
}
if (ev.type === "pointermove") {
- if (state.down.distanceTo(p) < 50) {
+ if (state.down.distanceTo(p) < params.notMoveRadius) {
return
}
}