www.spaceplanner.app

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

commit f5c8ef2fa264a9baf4c4c17fd2ad06898f2f6003
parent cfa2bc712d99876f38ce107ae82ec08c8db7dd61
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Sat, 12 Oct 2024 19:42:01 -0700

Use already grouped furniture maps in selectHandler

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

diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js @@ -322,15 +322,16 @@ function selectHandler(event, editor, state) { } } - let fmaps = ids.filter(function(item) { return backend.idType(item) === "furmap" }) - if (fmaps.length !== 1) { - document.querySelectorAll(".furniture_menu").forEach( - function(e) { - e.remove() - } - ) - } else { - furnitureMenu(editor, fmaps[0]) + if (groups.furmaps) { + if (groups.furmaps.length !== 1) { + document.querySelectorAll(".furniture_menu").forEach( + function(e) { + e.remove() + } + ) + } else { + furnitureMenu(editor, groups.furmaps[0]) + } } if (old) {