[MIN-318] Plugins: consecutive call of openMap and fitBounds
[Link to bug report|https://appunite.slack.com/archives/C068W173NFJ/p1711461411907129]
Description Sometimes when plugin call openMap and fitBounds consecutively the map is centered properly but zoom is wrong. In the attachment is a short video showing that on the first click proper map is opened and center is correct but zoom is wrong. After second click (the same data is sent to minerva) the zoom is computed properly. It happens rarely (I would say one in five times), it happens more often when new submap is opened (there is no tab for new submap before openMap call), however it can also happen when the submap is already opened. Environment
Console logs
Open plugin:
[https://lux1.atcomp.pl/plugins/starter-kit-new-front/plugin.js|https://lux1.atcomp.pl/plugins/starter-kit-new-front/plugin.js]2. Click "Retrieve random object from map" - it takes some time for the first time (~ 30 seconds)
Click "Focus" button (just under "Retrieve random object from map" button)
If the focus is correct repeat from point 2.
Expected result vs actual result Always set proper zoom.
[^screencast-from-26032024-133631_VtB6yYxh.webm]
Issue metadata
- Issue type: Bug
- Priority: Medium