diff --git a/BlueMapCommon/webapp/src/js/BlueMapApp.js b/BlueMapCommon/webapp/src/js/BlueMapApp.js index 5010f21e..85370874 100644 --- a/BlueMapCommon/webapp/src/js/BlueMapApp.js +++ b/BlueMapCommon/webapp/src/js/BlueMapApp.js @@ -726,6 +726,7 @@ export class BlueMapApp { controls.ortho = parseFloat(values[8]); this.updatePageAddress(); + this.mapViewer.updateLoadedMapArea(); return true; } diff --git a/BlueMapCommon/webapp/src/js/controls/ControlsManager.js b/BlueMapCommon/webapp/src/js/controls/ControlsManager.js index f7083ba1..bb578915 100644 --- a/BlueMapCommon/webapp/src/js/controls/ControlsManager.js +++ b/BlueMapCommon/webapp/src/js/controls/ControlsManager.js @@ -58,8 +58,8 @@ export class ControlsManager { this.lastOrtho = this.ortho; this.lastTilt = this.tilt; - this.lastMapUpdatePosition = this.position.clone(); - this.lastMapUpdateDistance = this.distance; + this.lastMapUpdatePosition = null; + this.lastMapUpdateDistance = null; this.averageDeltaTime = 16; @@ -157,9 +157,11 @@ export class ControlsManager { } if ( + this.lastMapUpdatePosition === null || + this.lastMapUpdateDistance === null || Math.abs(this.lastMapUpdatePosition.x - this.position.x) >= triggerDistance || Math.abs(this.lastMapUpdatePosition.z - this.position.z) >= triggerDistance || - (this.distance < 1000 && this.lastMapUpdateDistance > 1000) + (this.distance < 1000 && this.lastMapUpdateDistance >= 1000) ) { this.lastMapUpdatePosition = this.position.clone(); this.lastMapUpdateDistance = this.distance;