Skip to content

Commit

Permalink
Fix bug on resetting URL parameters when using proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Waguramu committed Jan 23, 2025
1 parent 54bdcc6 commit 339552d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions erdblick_app/app/parameters.service.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Injectable} from "@angular/core";
import {BehaviorSubject} from "rxjs";
import {Cartesian3, Cartographic, CesiumMath, Camera} from "./cesium";
import {Params, Router} from "@angular/router";
import {Params} from "@angular/router";
import {SelectedSourceData} from "./inspection.service";

export const MAX_NUM_TILES_TO_LOAD = 2048;
Expand Down Expand Up @@ -220,7 +220,7 @@ export class ParametersService {

legalInfoDialogVisible: boolean = false;

constructor(public router: Router) {
constructor() {
this.baseFontSize = parseFloat(window.getComputedStyle(document.documentElement).fontSize);

let parameters = this.loadSavedParameters();
Expand Down Expand Up @@ -452,7 +452,8 @@ export class ParametersService {
resetStorage() {
localStorage.removeItem('erdblickParameters');
localStorage.removeItem('searchHistory');
window.location.href = this.router.url.split('?')[0];
const {origin, pathname} = window.location;
window.location.href = origin + pathname;
}

private saveParameters() {
Expand Down

0 comments on commit 339552d

Please sign in to comment.