Note UX polish: pin marker, icon picker, fix Save button color
- The clicked location now stays marked (a plain maplibre-gl Marker, removed on save/cancel/deactivate) while the note form is open — before, nothing on the map showed where the pending note would land. - POI_ICONS gains a dozen more symbols (water, dump station, toilets, playground, viewpoint, swimming, fishing, climbing, hiking, …) via Object.assign after PARK4NIGHT_TAGS' own icon constants are declared (they're below POI_ICONS in the file, so the literal itself can't reference them directly) — reused as real marker-badge glyphs, not just PARK4NIGHT_TAGS' inline description-tag icons. NoteSaveForm gets a picker grid for these, shown only for a Point note (a Measure-drawn line/polygon has no one spot for a badge). - Fixed: .notes-panel__save's blue background was losing to .notes-panel__actions button's gray — same class-vs-class+element specificity trap .gpx-panel__action[hidden] already has a comment about elsewhere in this file. The button was never actually blue. Verified live (properly simulating a logged-in session this time, via Page.addScriptToEvaluateOnNewDocument rather than a post-load DOM poke, since NotesControl's mount decision happens once, synchronously, at page load): marker appears and clears correctly, 19 icons + "none" render and select, Save renders #1a5fb4. Full suite: 115 runs, 0 failures.
This commit is contained in:
1 parent
465a644365
commit
5576d2edf1
4 files changed
+142
-5
No files matched your search
@@ -305,6 +305,29 @@ export const PARK4NIGHT_TAGS = {
|
||||
windsurf: { icon: WIND_SURFING_ICON, label: "Windsurfing" },
|
||||
};
|
||||
|
||||
// Extends POI_ICONS (and so POI_ICON_KEYS, and what a marker badge can
|
||||
// show — see gpx.js's _registerCategoryGlyphs) with a handful of the same
|
||||
// symbols PARK4NIGHT_TAGS above already vendors, reused rather than
|
||||
// duplicated — this app's own hand-drawn notes (notes.js's icon picker)
|
||||
// need marker-badge glyphs for "water source"/"dump station"/"viewpoint"
|
||||
// far more than the original OSM-POI-upload set (parking/hotel/fuel) ever
|
||||
// covered. Object.assign, not more entries in the POI_ICONS literal
|
||||
// itself, since these constants are declared below it in this file.
|
||||
Object.assign(POI_ICONS, {
|
||||
amenity_drinking_water: DRINKING_WATER_ICON,
|
||||
amenity_sanitary_dump_station: SANITARY_DISPOSAL_ICON,
|
||||
amenity_toilets: RESTROOMS_ICON,
|
||||
shop_gas: PROPANE_ICON,
|
||||
amenity_electricity: ELECTRICAL_HOOKUP_ICON,
|
||||
shop_laundry: LAUNDRY_ICON,
|
||||
leisure_playground: PLAYGROUND_ICON,
|
||||
tourism_viewpoint: SCENIC_VIEWPOINT_ICON,
|
||||
leisure_swimming: SWIMMING_ICON,
|
||||
leisure_fishing: FISHING_ICON,
|
||||
sport_climbing: CLIMBING_ICON,
|
||||
route_hiking: WALKING_ICON,
|
||||
});
|
||||
|
||||
export const LIVETRACK_ICON = `
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
||||
<path d="M12 21s7-7.58 7-12a7 7 0 0 0-14 0c0 4.42 7 12 7 12z"/>
|
||||
|
||||
Reference in new issue
Block a user