From 62e24ac1ab6df5cf9046f1476869525199144225 Mon Sep 17 00:00:00 2001 From: jonasengelmann <40031476+jonasengelmann@users.noreply.github.com> Date: Tue, 19 Apr 2022 16:43:00 +0200 Subject: [PATCH] ensure constructor backward compatibility --- src/viewer.js | 2 +- src/viewport.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/viewer.js b/src/viewer.js index 0778e1e0..2b6a6b4a 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -378,7 +378,7 @@ $.Viewer = function( options ) { minZoomLevel: this.minZoomLevel, maxZoomLevel: this.maxZoomLevel, viewer: this, - initialDegrees: this.degrees, + degrees: this.degrees, flipped: this.flipped, navigatorRotate: this.navigatorRotate, homeFillsViewer: this.homeFillsViewer, diff --git a/src/viewport.js b/src/viewport.js index dffad0f1..203fe07f 100644 --- a/src/viewport.js +++ b/src/viewport.js @@ -86,6 +86,9 @@ $.Viewport = function( options ) { delete options.margins; + options.initialDegrees = options.degrees; + delete options.degrees; + $.extend( true, this, { //required settings