From 89248407e7c49b53e75c317de6c6b14d81f87aa1 Mon Sep 17 00:00:00 2001 From: cproudlock Date: Mon, 17 Aug 2026 15:20:44 -0400 Subject: [PATCH] Make the map editor accept a click, and unclutter its panel Clicking the map in the editor did nothing, ever. The click handler was bound inside `if (props.pickerMode)` at mount, and the editor mounts with no asset selected, so the handler was never attached; selecting an asset flipped the prop but nothing rebound it. The asset forms were unaffected because their picker mounts inside a modal that is already in picker mode, which is why this looked like an editor-only fault. The handler is now bound unconditionally and handleMapClick keeps its own picker-mode guard. Verified in a browser against the dev instance, both ways: with the old binding a click on a selected asset produced no position at all; with the fix the same click reports 1652, 1138. Markers are now drawn in picker mode too. Placing one relative to the machines already on the floor is the entire task, and the old code skipped rendering them whenever the map was a picker. Two things that looked like stray widgets: - The editor's panel header put a heading and three controls on one row inside a 320px panel, squeezing the search box until its placeholder read "Search na". The heading takes its own row and the controls share the next. - The legend drew its bar and border even with nothing to put in it, which read as an empty input box under the toolbar. It renders only when it has entries. --- frontend/src/components/ShopFloorMap.vue | 33 +++++++++++++++++------- frontend/src/views/MapEditor.vue | 16 +++++++++++- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/ShopFloorMap.vue b/frontend/src/components/ShopFloorMap.vue index cf6e9cf..b3bc84a 100644 --- a/frontend/src/components/ShopFloorMap.vue +++ b/frontend/src/components/ShopFloorMap.vue @@ -45,7 +45,7 @@ -
+