mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-17 23:33:14 +03:00
removed super class prototype extension patterns from DziTileSource in favor of more concise $.extend
This commit is contained in:
parent
f1882259e2
commit
a7050af619
@ -2595,11 +2595,9 @@ $.DziTileSource = function(width, height, tileSize, tileOverlap, tilesUrl, fileF
|
||||
this.initialize();
|
||||
};
|
||||
|
||||
$.DziTileSource.prototype = new $.TileSource();
|
||||
$.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
|
||||
|
||||
$.DziTileSource.prototype.constructor = $.DziTileSource;
|
||||
|
||||
$.DziTileSource.prototype.initialize = function() {
|
||||
initialize: function() {
|
||||
if (!this.displayRects) {
|
||||
return;
|
||||
}
|
||||
@ -2613,13 +2611,13 @@ $.DziTileSource.prototype.initialize = function() {
|
||||
this._levelRects[level].push(rect);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
$.DziTileSource.prototype.getTileUrl = function(level, x, y) {
|
||||
getTileUrl: function(level, x, y) {
|
||||
return [this.tilesUrl, level, '/', x, '_', y, '.', this.fileFormat].join('');
|
||||
};
|
||||
},
|
||||
|
||||
$.DziTileSource.prototype.tileExists = function(level, x, y) {
|
||||
tileExists: function(level, x, y) {
|
||||
var rects = this._levelRects[level];
|
||||
|
||||
if (!rects || !rects.length) {
|
||||
@ -2650,8 +2648,8 @@ $.DziTileSource.prototype.tileExists = function(level, x, y) {
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$.DziTileSourceHelper = {
|
||||
createFromXml: function(xmlUrl, xmlString, callback) {
|
||||
|
@ -13,11 +13,9 @@ $.DziTileSource = function(width, height, tileSize, tileOverlap, tilesUrl, fileF
|
||||
this.initialize();
|
||||
};
|
||||
|
||||
$.DziTileSource.prototype = new $.TileSource();
|
||||
$.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
|
||||
|
||||
$.DziTileSource.prototype.constructor = $.DziTileSource;
|
||||
|
||||
$.DziTileSource.prototype.initialize = function() {
|
||||
initialize: function() {
|
||||
if (!this.displayRects) {
|
||||
return;
|
||||
}
|
||||
@ -31,13 +29,13 @@ $.DziTileSource.prototype.initialize = function() {
|
||||
this._levelRects[level].push(rect);
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
$.DziTileSource.prototype.getTileUrl = function(level, x, y) {
|
||||
getTileUrl: function(level, x, y) {
|
||||
return [this.tilesUrl, level, '/', x, '_', y, '.', this.fileFormat].join('');
|
||||
};
|
||||
},
|
||||
|
||||
$.DziTileSource.prototype.tileExists = function(level, x, y) {
|
||||
tileExists: function(level, x, y) {
|
||||
var rects = this._levelRects[level];
|
||||
|
||||
if (!rects || !rects.length) {
|
||||
@ -68,8 +66,8 @@ $.DziTileSource.prototype.tileExists = function(level, x, y) {
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$.DziTileSourceHelper = {
|
||||
createFromXml: function(xmlUrl, xmlString, callback) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user