diff --git a/frontend/src/components/maps/LocationMapBottomSheet.jsx b/frontend/src/components/maps/LocationMapBottomSheet.jsx index 94faa24..ab8aa90 100644 --- a/frontend/src/components/maps/LocationMapBottomSheet.jsx +++ b/frontend/src/components/maps/LocationMapBottomSheet.jsx @@ -85,6 +85,7 @@ export default function LocationMapBottomSheet({ const selectedWidth = Number(selectedObject?.width) || 40; const selectedHeight = Number(selectedObject?.height) || 40; const hiddenAreaLabel = `Show Hidden Areas (${hiddenAreaCount})`; + const geometryLocked = Boolean(selectedObject?.locked); 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)); @@ -294,7 +295,7 @@ export default function LocationMapBottomSheet({ max={maxX} step="1" value={Math.round(selectedObject.x)} - disabled={saving} + disabled={saving || geometryLocked} onChange={(event) => onObjectField("x", Number(event.target.value))} /> @@ -306,7 +307,7 @@ export default function LocationMapBottomSheet({ max={maxY} step="1" value={Math.round(selectedObject.y)} - disabled={saving} + disabled={saving || geometryLocked} onChange={(event) => onObjectField("y", Number(event.target.value))} /> @@ -318,7 +319,7 @@ export default function LocationMapBottomSheet({ max={maxWidth} step="1" value={Math.round(selectedObject.width)} - disabled={saving} + disabled={saving || geometryLocked} onChange={(event) => onObjectField("width", Number(event.target.value))} /> @@ -330,11 +331,16 @@ export default function LocationMapBottomSheet({ max={maxHeight} step="1" value={Math.round(selectedObject.height)} - disabled={saving} + disabled={saving || geometryLocked} onChange={(event) => onObjectField("height", Number(event.target.value))} /> + {geometryLocked ? ( +

+ Unlock this area before moving or resizing it. +

+ ) : null}
diff --git a/frontend/src/components/maps/LocationMapCanvas.jsx b/frontend/src/components/maps/LocationMapCanvas.jsx index 29b84ec..93c1293 100644 --- a/frontend/src/components/maps/LocationMapCanvas.jsx +++ b/frontend/src/components/maps/LocationMapCanvas.jsx @@ -318,7 +318,7 @@ export default function LocationMapCanvas({ ) : null} {pinDots} - {canEditObjects && isSelected ? ( + {canEditObjects && isSelected && !object.locked ? (