mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-02-20 08:43:13 +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();
|
this.initialize();
|
||||||
};
|
};
|
||||||
|
|
||||||
$.DziTileSource.prototype = new $.TileSource();
|
$.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
|
||||||
|
|
||||||
$.DziTileSource.prototype.constructor = $.DziTileSource;
|
initialize: function() {
|
||||||
|
|
||||||
$.DziTileSource.prototype.initialize = function() {
|
|
||||||
if (!this.displayRects) {
|
if (!this.displayRects) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2613,13 +2611,13 @@ $.DziTileSource.prototype.initialize = function() {
|
|||||||
this._levelRects[level].push(rect);
|
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('');
|
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];
|
var rects = this._levelRects[level];
|
||||||
|
|
||||||
if (!rects || !rects.length) {
|
if (!rects || !rects.length) {
|
||||||
@ -2650,8 +2648,8 @@ $.DziTileSource.prototype.tileExists = function(level, x, y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$.DziTileSourceHelper = {
|
$.DziTileSourceHelper = {
|
||||||
createFromXml: function(xmlUrl, xmlString, callback) {
|
createFromXml: function(xmlUrl, xmlString, callback) {
|
||||||
|
@ -13,11 +13,9 @@ $.DziTileSource = function(width, height, tileSize, tileOverlap, tilesUrl, fileF
|
|||||||
this.initialize();
|
this.initialize();
|
||||||
};
|
};
|
||||||
|
|
||||||
$.DziTileSource.prototype = new $.TileSource();
|
$.extend( $.DziTileSource.prototype, $.TileSource.prototype, {
|
||||||
|
|
||||||
$.DziTileSource.prototype.constructor = $.DziTileSource;
|
initialize: function() {
|
||||||
|
|
||||||
$.DziTileSource.prototype.initialize = function() {
|
|
||||||
if (!this.displayRects) {
|
if (!this.displayRects) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -31,13 +29,13 @@ $.DziTileSource.prototype.initialize = function() {
|
|||||||
this._levelRects[level].push(rect);
|
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('');
|
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];
|
var rects = this._levelRects[level];
|
||||||
|
|
||||||
if (!rects || !rects.length) {
|
if (!rects || !rects.length) {
|
||||||
@ -68,8 +66,8 @@ $.DziTileSource.prototype.tileExists = function(level, x, y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
|
});
|
||||||
|
|
||||||
$.DziTileSourceHelper = {
|
$.DziTileSourceHelper = {
|
||||||
createFromXml: function(xmlUrl, xmlString, callback) {
|
createFromXml: function(xmlUrl, xmlString, callback) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user