RECEIPT-H2020 / TerriaMap

Receipt H2020 Platform
https://www.climateimpactstories.eu/
Apache License 2.0
2 stars 0 forks source link

Zoom/home camera broken #112

Closed goord closed 1 year ago

goord commented 2 years ago

Possibly due to the scenario button refactoring, zooming on the map seems to be broken. Also the home camera resets the view to an incorrect position

kretep commented 2 years ago

@goord could you clarify these points?

goord commented 2 years ago

Hi @kretep with zooming I mean the camera position when going to a new page. I am running the receipt branch locally. The problem can be observed in the soy test storyline, when I progress to the 'drivers of degradation' page, the camera remains focused on Europe (see image). 2022-06-16 09 42 27 localhost bfcb0bc1eff4 When I manually set my focus to argentina and click 'reset zoom' (top right navigation button in map), the focus switches back to Europe.

Maartenvm commented 2 years ago

I think I see where this bug comes from, working on it.

goord commented 2 years ago

Almost fixed: in the new version the view returns to the json-defined zoom level when changing scenarios, which is undesirable. Typically a user wants to zoom into a region to observe the difference between scenarios and this resetting to the default makes that a lot harder.

I reopen the issue because the above behavior seems a side-effect of the fix.

kretep commented 2 years ago

@goord I pushed some changes to fix this (storylines branches in both repos). It now doesn't reset the zoom when switching between scenarios, as long as "zoomOnEnable": false in the story initfile.

goord commented 1 year ago

Indeed fixed.