www.spaceplanner.app

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

commit a239b4275aec1bcd09f36d3d8a52f07768b58741
parent d058f3e5702afaf44051a68bff8009168ee08b00
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Tue, 22 Oct 2024 11:25:21 -0700

Enable longpress to add furnitre only with mouse

On touch devices it interferes with panning and zooming.

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

diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js @@ -1139,7 +1139,7 @@ function addFurnitureHandler(ev, editor, state) { let p = new Vector2(ev.clientX, ev.clientY) if (!state.down) { - if (ev.type === "pointerdown") { + if (ev.pointerType === "mouse" && ev.type === "pointerdown") { state.down = p state.time = ev.timeStamp state.timeout = setTimeout(function() {