www.spaceplanner.app

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

commit 9251fd6875b1e3bccc958ace1a5d7fe25ba03b16
parent 30658db52ce3d19151eff920b5b311a8103fe2e6
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Tue,  3 Sep 2024 10:19:11 -0700

Add force option to editor addPoint

This forces creation of a new point regardless of whether it would
be overlapping another.

Diffstat:
Mfiles/floorplans/floorplan/editor.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/files/floorplans/floorplan/editor.js b/files/floorplans/floorplan/editor.js @@ -461,11 +461,13 @@ export class FloorplanEditor { addPoint(point, force) { if (!force) { let already = this.pointAt(point) - if (already) { + if (already != null) { return already } } - return this.backend.addPoint(point) + let p = this.backend.addPoint(point) + this.updateDisplay() + return p } remove(...elements) {