From daa283b1606f950e3cac757eee7e065e633bc249 Mon Sep 17 00:00:00 2001 From: Nico Date: Wed, 3 Jun 2026 21:36:22 -0700 Subject: [PATCH] fix: recover hidden map areas --- .../maps/LocationMapBottomSheet.jsx | 31 ++++++++ frontend/src/pages/LocationMapManager.jsx | 14 ++++ .../src/styles/pages/LocationMapManager.css | 42 +++++++++++ frontend/tests/location-map-manager.spec.ts | 74 +++++++++++++++++++ 4 files changed, 161 insertions(+) diff --git a/frontend/src/components/maps/LocationMapBottomSheet.jsx b/frontend/src/components/maps/LocationMapBottomSheet.jsx index 2a283b2..94faa24 100644 --- a/frontend/src/components/maps/LocationMapBottomSheet.jsx +++ b/frontend/src/components/maps/LocationMapBottomSheet.jsx @@ -30,6 +30,7 @@ export default function LocationMapBottomSheet({ selectedObject, selectedZoneItems, visibleUnmappedItems, + hiddenAreaCount, history, future, saving, @@ -51,6 +52,7 @@ export default function LocationMapBottomSheet({ onClearSelection, onDuplicateObject, onDeleteObject, + onShowHiddenAreas, }) { const selectedTitle = getMapObjectDisplayLabel(selectedObject); const selectedAssignedItems = selectedObject?.zone_id @@ -82,6 +84,7 @@ export default function LocationMapBottomSheet({ const hiddenUnmappedItemCount = visibleUnmappedItems.length - unmappedItemPreview.length; const selectedWidth = Number(selectedObject?.width) || 40; const selectedHeight = Number(selectedObject?.height) || 40; + const hiddenAreaLabel = `Show Hidden Areas (${hiddenAreaCount})`; const maxX = Math.max(0, Math.round((mapSize?.width || selectedWidth) - selectedWidth)); const maxY = Math.max(0, Math.round((mapSize?.height || selectedHeight) - selectedHeight)); const maxWidth = Math.max(40, Math.round(mapSize?.width || selectedWidth)); @@ -217,6 +220,14 @@ export default function LocationMapBottomSheet({ ) : null} + {showEditorControls && hiddenAreaCount > 0 ? ( +
+ +
+ ) : null} + {mode === "edit" && editorTool === "edit" && selectedObject ? (
+
+ + +