aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2024-01-22 03:27:49 +0100
committerGuilhem Moulin <guilhem@fripost.org>2024-01-22 03:31:35 +0100
commit0548452b7c2dfe57ade979483b9046d1e1e17f43 (patch)
tree046bd03bc63e1ea77dd49fc6a0082b365cfba9b8
parentdf1a866cb6441ab459602349985f509d86c094c0 (diff)
Fix space damage.
-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();
});