diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2024-01-22 03:27:49 +0100 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2024-01-22 03:31:35 +0100 |
commit | 0548452b7c2dfe57ade979483b9046d1e1e17f43 (patch) | |
tree | 046bd03bc63e1ea77dd49fc6a0082b365cfba9b8 | |
parent | df1a866cb6441ab459602349985f509d86c094c0 (diff) |
Fix space damage.
-rw-r--r-- | main.js | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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(); }); |