diff --git a/BlueMapCommon/webapp/src/js/BlueMapApp.js b/BlueMapCommon/webapp/src/js/BlueMapApp.js index 7c557320e..188964684 100644 --- a/BlueMapCommon/webapp/src/js/BlueMapApp.js +++ b/BlueMapCommon/webapp/src/js/BlueMapApp.js @@ -708,6 +708,12 @@ export class BlueMapApp { } } + switch (values[9]) { + case "flat" : this.setFlatView(0); break; + case "free" : this.setFreeFlight(0, controls.position.y); break; + default : this.setPerspectiveView(0); break; + } + controls.position.x = parseFloat(values[1]); controls.position.y = parseFloat(values[2]); controls.position.z = parseFloat(values[3]); @@ -717,11 +723,7 @@ export class BlueMapApp { controls.tilt = parseFloat(values[7]); controls.ortho = parseFloat(values[8]); - switch (values[9]) { - case "flat" : this.setFlatView(0); break; - case "free" : this.setFreeFlight(0, controls.position.y); break; - default : this.setPerspectiveView(0); break; - } + this.updatePageAddress(); return true; } diff --git a/BlueMapCommon/webapp/src/js/util/Utils.js b/BlueMapCommon/webapp/src/js/util/Utils.js index cdb0497e4..b588c0c7f 100644 --- a/BlueMapCommon/webapp/src/js/util/Utils.js +++ b/BlueMapCommon/webapp/src/js/util/Utils.js @@ -204,7 +204,11 @@ export const animate = function (animationFrame, durationMs = 1000, postAnimatio } }; - window.requestAnimationFrame(time => animation.frame(time)); + if (durationMs !== 0) { + window.requestAnimationFrame(time => animation.frame(time)); + } else { + animation.frame(0); + } return animation; }