aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/main.js b/main.js
index 62eccdb..017063c 100644
--- a/main.js
+++ b/main.js
@@ -468,17 +468,17 @@ if (window.location !== window.parent.location) {
container.setAttribute('aria-hidden', 'false');
view.on('change', function(event) {
- const popover = Popover.getInstance(popup);
- if (popover !== null) {
- popover.dispose();
- }
+ const popover = Popover.getInstance(popup);
+ if (popover !== null) {
+ popover.dispose();
+ }
- const coordinates = view.getCenter();
- const searchParams = new URLSearchParams(location.hash.substring(1));
- searchParams.set('x', coordinates[0].toFixed(2).replace(TRAILING_ZEROES, ''));
- searchParams.set('y', coordinates[1].toFixed(2).replace(TRAILING_ZEROES, ''));
- searchParams.set('z', view.getZoom().toFixed(3).replace(TRAILING_ZEROES, ''));
- location.hash = '#' + searchParams.toString();
+ const coordinates = view.getCenter();
+ const searchParams = new URLSearchParams(location.hash.substring(1));
+ searchParams.set('x', coordinates[0].toFixed(2).replace(TRAILING_ZEROES, ''));
+ searchParams.set('y', coordinates[1].toFixed(2).replace(TRAILING_ZEROES, ''));
+ searchParams.set('z', view.getZoom().toFixed(3).replace(TRAILING_ZEROES, ''));
+ location.hash = '#' + searchParams.toString();
});