mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
ensure backward compatibility
This commit is contained in:
parent
d62538f42e
commit
c16d1e3dff
@ -378,7 +378,7 @@ $.Viewer = function( options ) {
|
||||
minZoomLevel: this.minZoomLevel,
|
||||
maxZoomLevel: this.maxZoomLevel,
|
||||
viewer: this,
|
||||
degrees: this.degrees,
|
||||
initialDegrees: this.degrees,
|
||||
flipped: this.flipped,
|
||||
navigatorRotate: this.navigatorRotate,
|
||||
homeFillsViewer: this.homeFillsViewer,
|
||||
|
@ -107,7 +107,7 @@ $.Viewport = function( options ) {
|
||||
defaultZoomLevel: $.DEFAULT_SETTINGS.defaultZoomLevel,
|
||||
minZoomLevel: $.DEFAULT_SETTINGS.minZoomLevel,
|
||||
maxZoomLevel: $.DEFAULT_SETTINGS.maxZoomLevel,
|
||||
degrees: $.DEFAULT_SETTINGS.degrees,
|
||||
initialDegrees: $.DEFAULT_SETTINGS.degrees,
|
||||
flipped: $.DEFAULT_SETTINGS.flipped,
|
||||
homeFillsViewer: $.DEFAULT_SETTINGS.homeFillsViewer,
|
||||
silenceMultiImageWarnings: $.DEFAULT_SETTINGS.silenceMultiImageWarnings
|
||||
@ -134,11 +134,10 @@ $.Viewport = function( options ) {
|
||||
});
|
||||
|
||||
this.degreesSpring = new $.Spring({
|
||||
initial: options.degrees,
|
||||
initial: options.initialDegrees,
|
||||
springStiffness: this.springStiffness,
|
||||
animationTime: this.animationTime
|
||||
});
|
||||
delete options.degrees;
|
||||
|
||||
this._oldCenterX = this.centerSpringX.current.value;
|
||||
this._oldCenterY = this.centerSpringY.current.value;
|
||||
@ -153,6 +152,19 @@ $.Viewport = function( options ) {
|
||||
|
||||
/** @lends OpenSeadragon.Viewport.prototype */
|
||||
$.Viewport.prototype = {
|
||||
|
||||
// deprecated
|
||||
get degrees () {
|
||||
$.console.warn('Accessing [Viewport.degrees] is deprecated. Use viewport.getRotation instead.');
|
||||
return this.getRotation();
|
||||
},
|
||||
|
||||
// deprecated
|
||||
set degrees (degrees) {
|
||||
$.console.warn('Setting [Viewport.degrees] is deprecated. Use viewport.setRotation instead.');
|
||||
this.setRotation(degrees);
|
||||
},
|
||||
|
||||
/**
|
||||
* Updates the viewport's home bounds and constraints for the given content size.
|
||||
* @function
|
||||
|
Loading…
Reference in New Issue
Block a user