geosolutions-it / MapStore2

The solution to create and share maps, dashboards, geostories with 3D support on the web. And it is open-source too!
https://mapstore.geosolutionsgroup.com/
Other
503 stars 386 forks source link

MapViews animation timeout isn't saved #10266

Open landryb opened 4 months ago

landryb commented 4 months ago

Description

using the mapviews plugin and setting an animation timing different than the default 10s doesn't work, the config param isn't saved when exiting the mapview edition

How to reproduce

Expected Result

the time should be 2s Current Result

the time is 10s

Other useful information

this is on 2023.02.xx via mapstore2-georchestra

landryb commented 4 months ago

Peek 30-04-2024 15-02

landryb commented 4 months ago

i can reproduce on master

tdipisa commented 4 months ago

@landryb thank you for reporting.

landryb commented 2 months ago

after a second look, the duration is properly persisted if typing a number in the field and exiting from the field, but not persisted if using the arrows/+&- and directly clicking the 'stop editing' button.

it is only persisted if you click inside the field and then out of it, eg click on the number, hit tab key, stop editing -> value is kept. if you don't click/exit, the value changed with the arrow buttons is lost. Bug from the component in https://github.com/geosolutions-it/MapStore2/blob/master/web/client/components/mapviews/settings/AnimationSection.jsx#L36 ?

landryb commented 2 months ago

that DebouncedFormControl component was added in https://github.com/geosolutions-it/MapStore2/blame/master/web/client/components/misc/DebouncedFormControl.jsx for #8729 .. @allyoucanmap ? some bad interaction missing some state saving in handleBlurChange which reacts to +/- ? should handleChange be used instead of setValue ?