earthrise-media / vacs-map

Exploring VACS project data
1 stars 0 forks source link

Map tooltip anchored to screen not map on mobile #102

Closed cameronkruse closed 10 months ago

cameronkruse commented 10 months ago

when a user clicks a dot on the map, the popup is fixed to a screen position not the map. If the user pans the map after clicking a dot, the dot moves away from the tooltip (see screenshot).

Desired behavior would be for the tooltip to anchor to the dot on the map like it does on desktop. IMG_0505

mwbernard commented 10 months ago

@cameronkruse we're only ever pinning tooltips to mouse position on the screen, and the mobile interpretation of 'hover' as a touch is causing this.

A quick solution would be giving the tooltip a fixed position (maybe near the bottom of the screen) on mobile? I get that its not ideal but seems better than a floating one that moves around. And the dots will still be highlighted to show which one you're looking at

cameronkruse commented 10 months ago

I think that's a good solution for mobile, will it be the same implementation on desktop if we switch it though?

mwbernard commented 10 months ago

Nope, no change to desktop behavior

cameronkruse commented 10 months ago

This seems like a good solution!