golf1052 / SeattleCarsInBikeLanes

A website displaying and collecting pictures of cars in bike lanes in Seattle.
https://seattle.carinbikelane.com
MIT License
9 stars 1 forks source link

Twitter popups jump around when dragging the map #7

Closed benrafshoon closed 10 months ago

benrafshoon commented 1 year ago

To repro:

  1. Go to https://seattle.carinbikelane.com/
  2. Click on a pin. Twitter window pops up over pin
  3. Scroll the map. Expected behavior: the twitter window stays in the same place over the pin. Actual behavior: the twitter window jumps down on the page.
golf1052 commented 1 year ago

I've made a change that should slightly improve this behavior. The reason the Twitter embed moves around is because that is the behavior of the popup control for the map. When one of the sides of the popup moves outside the window the popup will flip to the other side. There's probably a way to change the popup behavior but that requires more investigation.

https://user-images.githubusercontent.com/1903871/229383169-df8de30d-a79d-4ddf-a80d-0addc3328efb.mp4