www.spaceplanner.app

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

commit 8f5bf0445d25856c97afef01509bc832a436798f
parent f36288420e082201c90366ae13e59a9ae203b301
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Sun, 13 Oct 2024 14:46:55 -0700

Fix new furniture position being reset with menu

When you added furniture, moved it, then updated a value in the
furniture menu, the position parameters would be reset to what they
were originally which is obviously not what is wanted.

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

diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js @@ -953,6 +953,10 @@ function furnitureMenuX(editor, pointOrID) { editor.findObj(id).select() } + /* We don't want to update these */ + delete params.x + delete params.y + let items = [ menuItem("name", "Name", { attributes: { value: params.name ?? "" } }), menuItem("type", "Type", { break: false, enum: editor.furniture_types, attributes: { value: params.type, required: true } }),