mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-13 15:51:00 +00:00
fix(journey): keep GL photo markers absolutely positioned so thumbnails sit on their coordinates
The journey map's photo thumbnails set position:relative inline on the marker element. That overrides the engine's .mapboxgl-marker/.maplibregl-marker position:absolute, so every thumbnail entered the normal flow below the ones drawn before it and the engine's translate was added on top: the further down the list, the further the photo drifted from its spot. The location dot had the same inline position. Both now leave position to the engine's class. Closes #2910
This commit is contained in:
@@ -13,7 +13,9 @@ type MarkerConstructor = new (options?: { element?: HTMLElement; anchor?: string
|
||||
// and mapbox doesn't get confused about which element to position.
|
||||
function buildLocationEl(): { root: HTMLDivElement; cone: HTMLDivElement } {
|
||||
const root = document.createElement('div')
|
||||
root.style.cssText = 'width:28px;height:28px;position:relative;pointer-events:none;'
|
||||
// No inline `position`: the GL marker class keeps the root absolute, which the
|
||||
// children's insets resolve against (see the note on markers in MapViewGL).
|
||||
root.style.cssText = 'width:28px;height:28px;pointer-events:none;'
|
||||
// Accuracy pulse behind the dot
|
||||
const pulse = document.createElement('div')
|
||||
pulse.style.cssText = `
|
||||
|
||||
Reference in New Issue
Block a user