From 58446021aaef002422c52c7d6c4b1a860d116de5 Mon Sep 17 00:00:00 2001 From: MetroWind Date: Sun, 31 Aug 2025 09:45:36 -0700 Subject: UI layout --- scripts/main.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'scripts/main.js') diff --git a/scripts/main.js b/scripts/main.js index b8de9e4..5483adf 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -108,8 +108,8 @@ ${cell_y * (CELL_SIZE + 1) + 1})`}, ASSET_WHITE_BG, TILES[idx].inner_svg); function PlanView({plan, mouse_state}) { - console.debug("Looking at plan ", plan); - return h("div", {}, + return h("div", {"id": "PlanView"}, + h("div", {"id": "EntryIndicator"}, "⬇️"), h(PlanGridView, {content: plan, mouse_state: mouse_state})); } @@ -190,13 +190,17 @@ function App({initial_state}) } return h("div", {}, - h(FloorSelector, {floor: state.floor + 1, - on_floor_change: onFloorChange}), - h(AssetsView, {on_drag_begin: onDragAssetBegin, - on_drag_end: onDragAssetEnd}), + h("div", {"class": "MainWrapper"}, + h("aside", {}, + h(FloorSelector, {floor: state.floor + 1, + on_floor_change: onFloorChange}), + h("div", {"class": "LabeledPanel"}, + h("h2", {}, "Rooms"), + h(AssetsView, {on_drag_begin: onDragAssetBegin, + on_drag_end: onDragAssetEnd}))), + h(PlanView, {plan: state.plan[state.floor], + mouse_state: state.mouse_state})), h("hr", {}), - h(PlanView, {plan: state.plan[state.floor], - mouse_state: state.mouse_state}), h("div", {}, h("textarea", {readonly: true}, state.plan_code)), h("div", {"class": "ButtonRow"}, -- cgit v1.2.3-70-g09d2