commit d064fe5c27dfe1c147136458b4b1edc7c4ac0725
parent 8b8dbe38f6a00027f94f397d470882d4d983980c
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Thu, 17 Oct 2024 15:02:47 -0700
Remove double click to subdivide
It gets in the way when your clicking on a pointmap to find the
right place to subdivide it. Maybe in the future I'll update the
precisePointHandler to display a length like the selOps toolbar bit
does. That would probably be best anyway. Regardless I'm avoiding
double click, etc.
Diffstat:
1 file changed, 0 insertions(+), 18 deletions(-)
diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js
@@ -1089,24 +1089,6 @@ function precisePointMapHandler(event, editor, state) {
let id = lib.getID(map)
let data = editor.backend.obj(id)
-
- // TODO: Stop using double click
- // Explicitly check button in case UA isn't complient
- if (event.type === "dblclick" && data.type === "wall" && event.button == buttons.left) {
- handled(event)
-
- let sub = map.whereIsPoint(cursor.x, cursor.y)
- if (sub == null) {
- throw new Error("Expected point on line")
- }
-
- sub = editor.addPoint(sub)
- editor.mapPoints({ type: "wall", a: data.a, b: sub })
- editor.mapPoints({ type: "wall", a: sub, b: data.b })
- editor.remove(map)
- return
- }
-
if (data.type !== "door" || !truelyPrimary(event)) {
return
}