reverted change to argument order in _updateTile call

This commit is contained in:
Tom 2023-06-14 07:51:50 -07:00
parent 2e248baf91
commit 7bb02d51d0
4 changed files with 25 additions and 9 deletions

View File

@ -46,8 +46,12 @@
*/ */
class CanvasDrawer extends $.DrawerBase{ class CanvasDrawer extends $.DrawerBase{
constructor(options){ constructor(){
super(options); super(...arguments);
// Options
/** /**
* 2d drawing context for {@link OpenSeadragon.Drawer#canvas} if it's a <canvas> element, otherwise null. * 2d drawing context for {@link OpenSeadragon.Drawer#canvas} if it's a <canvas> element, otherwise null.

View File

@ -34,6 +34,10 @@
(function( $ ){ (function( $ ){
$.DrawerOptions = class DrawerOptions{
constructor(options){}
};
/** /**
* @class DrawerBase * @class DrawerBase
* @memberof OpenSeadragon * @memberof OpenSeadragon
@ -44,7 +48,7 @@
* @param {Element} options.element - Parent element. * @param {Element} options.element - Parent element.
*/ */
class DrawerBase{ $.DrawerBase = class DrawerBase{
constructor(options){ constructor(options){
$.console.assert( options.viewer, "[Drawer] options.viewer is required" ); $.console.assert( options.viewer, "[Drawer] options.viewer is required" );
@ -67,6 +71,15 @@ class DrawerBase{
$.console.error( "[Drawer] options.source is no longer accepted; use TiledImage instead" ); $.console.error( "[Drawer] options.source is no longer accepted; use TiledImage instead" );
} }
// Object.entries({}).forEach( ([key, value]) => {
// try{
// this[key] = value;
// } catch(e) {
// $.console.error(`This Drawer implementation does not support option '${key}:${value}'`);
// }
// });
this.viewer = options.viewer; this.viewer = options.viewer;
this.viewport = options.viewport; this.viewport = options.viewport;
this.debugGridColor = typeof options.debugGridColor === 'string' ? [options.debugGridColor] : options.debugGridColor || $.DEFAULT_SETTINGS.debugGridColor; this.debugGridColor = typeof options.debugGridColor === 'string' ? [options.debugGridColor] : options.debugGridColor || $.DEFAULT_SETTINGS.debugGridColor;
@ -130,6 +143,7 @@ class DrawerBase{
get isOpenSeadragonDrawer(){ get isOpenSeadragonDrawer(){
return true; return true;
} }
/** /**
* @param tiledImage the TiledImage that is ready to be drawn * @param tiledImage the TiledImage that is ready to be drawn
*/ */
@ -259,8 +273,6 @@ class DrawerBase{
}; };
} }
} };
$.DrawerBase = DrawerBase;
}( OpenSeadragon )); }( OpenSeadragon ));

View File

@ -46,8 +46,8 @@
*/ */
class HTMLDrawer extends $.DrawerBase{ class HTMLDrawer extends $.DrawerBase{
constructor(options){ constructor(){
super(options); super(...arguments);
/** /**
* 2d drawing context for {@link OpenSeadragon.Drawer#canvas} if it's a <canvas> element, otherwise null. * 2d drawing context for {@link OpenSeadragon.Drawer#canvas} if it's a <canvas> element, otherwise null.

View File

@ -1597,8 +1597,8 @@ $.extend($.TiledImage.prototype, $.EventSource.prototype, /** @lends OpenSeadrag
} }
var result = this._updateTile( var result = this._updateTile(
haveDrawn,
drawLevel, drawLevel,
haveDrawn,
flippedX, y, flippedX, y,
level, level,
levelVisibility, levelVisibility,