Skip to content

Commit

Permalink
Merge branch 'main' into 4pages
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenpt committed Sep 4, 2024
2 parents fc44e26 + e2db1ab commit 8c65146
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion view.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,16 @@ let _View = {
if (state == null) {
state = currentState();
}
return '?Tx=' + state.T[0] + '&Ty=' + state.T[1] + '&S=' + state.S;
// Step 1: Access the current query string
const queryString = window.location.search;

// Step 2: Parse the query string
const urlParams = new URLSearchParams(queryString);
urlParams.set('Tx',state.T[0]);
urlParams.set('Ty',state.T[1]);
urlParams.set('S',state.S);

return '?' + urlParams.toString();
},

applyZoom: function applyZoom (T_, S_, smooth = true, noTemp = false) {
Expand Down

0 comments on commit 8c65146

Please sign in to comment.