feat(collections): the map's padlock, and a picked place on the full map keeps the map

The collections map gets the trip map's padlock (#2010): locked, a click on a
place leaves the camera where it is, so places can be clicked through without
the map zooming in and out. One setting for both maps. On the full map a
picked place no longer brings the list back: its details dock on the map's
edge, or open as a sheet on a narrow screen.
This commit is contained in:
Maurice
2026-11-15 12:11:42 +01:00
parent d1cb0a418a
commit b65a1bb65c
8 changed files with 95 additions and 25 deletions
@@ -28,6 +28,9 @@ interface CollectionMapPanelProps {
onLabelFilter?: (ids: number[]) => void
canManageLabels?: boolean
onManageLabels?: () => void
/** The padlock on the desktop map (#2010); the phone has no hover to look around with. */
mapLocked?: boolean
onToggleMapLocked?: () => void
t: TranslationFn
}
@@ -39,7 +42,7 @@ interface CollectionMapPanelProps {
export default function CollectionMapPanel({
places, selectedPlaceId, onSelect, onDeselect, dark, overlay, view, onToggleView,
search, onSearch, labelOptions = [], labelFilter = [], onLabelFilter, canManageLabels = false,
onManageLabels, t,
onManageLabels, mapLocked = false, onToggleMapLocked, t,
}: CollectionMapPanelProps): React.ReactElement {
const showLabels = onLabelFilter != null && (labelOptions.length > 0 || canManageLabels)
return (
@@ -51,6 +54,8 @@ export default function CollectionMapPanel({
onDeselect={onDeselect}
dark={dark}
underBar={overlay}
locked={overlay && mapLocked}
onToggleLock={overlay ? onToggleMapLocked : undefined}
/>
{overlay && (
<div className="col-map-topbar">