www.spaceplanner.app

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

commit cc66e05503a8371d9b19f2535626e6b1fac2e168
parent 0d17a2547752b41ff5561902c76b277d984e8908
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Mon, 26 Aug 2024 13:16:52 -0700

Use selector menu for pointmap type selection

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

diff --git a/files/floorplans/floorplan/main.js b/files/floorplans/floorplan/main.js @@ -151,18 +151,14 @@ function selectHandler(event, editor) { } if (maps.length > 0) { + const changeTypes = function(newvalue) { + for (let i in maps) { + editor.mapPoints(newvalue, maps[i].a, maps[i].b) + editor.updateDisplay() + } + } c.appendChild( - radioMenu(editor, "Type", ["wall", "door"], null, { - nosubmit: true, - callbacks: { - change: function(newvalue) { - for (let i in maps) { - editor.mapPoints(newvalue, maps[i].a, maps[i].b) - editor.updateDisplay() - } - } - } - }) + selector(editor, { wall: true, door: true }, changeTypes, { text: "Type:" }) ) }