Skip to content

Commit

Permalink
Fix the gpx/data hash params so they aren't gobbled up before being s…
Browse files Browse the repository at this point in the history
…ent to the custom data renderer. (#1702)

Co-authored-by: Benjamin Clark <[email protected]>
  • Loading branch information
Bonkles and Benjamin Clark authored Mar 6, 2025
1 parent 927f0a8 commit 8afb060
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 2 additions & 2 deletions modules/core/UrlHashSystem.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ export class UrlHashSystem extends AbstractSystem {
this._paused = false;
this._currHash = null;

this._updateHash(); // make sure hash matches the _currParams
this._hashchange(); // emit 'hashchange' so other code knows what the hash contains
this._updateHash(); // make sure hash matches the _currParams
this._updateTitle();
}

Expand Down Expand Up @@ -231,7 +231,7 @@ export class UrlHashSystem extends AbstractSystem {
if (!this._started || this._paused) return;

// Remove some of the initial-only params that only clutter up the hash
const toOmit = ['comment', 'source', 'hashtags', 'walkthrough'];
const toOmit = ['comment', 'source', 'hashtags', 'walkthrough', 'data', 'gpx'];
let params = utilObjectOmit(Object.fromEntries(this._currParams), toOmit);

const newHash = '#' + utilQsString(params, true);
Expand Down
4 changes: 0 additions & 4 deletions modules/pixi/PixiLayerCustomData.js
Original file line number Diff line number Diff line change
Expand Up @@ -610,10 +610,6 @@ export class PixiLayerCustomData extends AbstractLayer {
_updateHash() {
const urlhash = this.context.systems.urlhash;

// reset
urlhash.setParam('gpx', null);
urlhash.setParam('data', null);

if (!this.enabled) return;

if (typeof this._wkt === 'string') {
Expand Down

0 comments on commit 8afb060

Please sign in to comment.