mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-25 22:27:32 +00:00
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:
@@ -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">
|
||||
|
||||
Reference in New Issue
Block a user