electricitymaps / electricitymaps-contrib

A real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.47k stars 924 forks source link

Enable panning inertia so panning feels smoother #6968

Open corradio opened 2 months ago

corradio commented 2 months ago

Describe the bug On Google Maps, after the map keeps panning for a short while after having been dragged (a so-called "inertia" effect). This makes the experience of scrolling the map easier as it enables to reach far-away areas faster. The setting has been disabled here. Would be great to re-enable it! More info about the maxSpeed option here: https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/DragPanOptions/

To Reproduce Steps to reproduce the behavior:

  1. Open app
  2. Drag map and release
  3. Map immediately stops being dragged

Expected behavior Map should continue panning for a short while.

VIKTORVAV99 commented 2 months ago

I think that was disabled due to it making the exchange arrows behave all weird. But I've been exploring an alternate way to render them which should allow us to enable this setting.

There was just some issues with scaling that I need to figure out with the new method.