Add test for initializing Zoomify source with custom tile size.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
|
||||
|
||||
goog.require('ol');
|
||||
goog.require('ol.dom');
|
||||
goog.require('ol.events');
|
||||
goog.require('ol.proj.Projection');
|
||||
@@ -30,6 +31,13 @@ describe('ol.source.Zoomify', function() {
|
||||
size: size
|
||||
});
|
||||
}
|
||||
function getZoomifySourceWith1024pxTiles() {
|
||||
return new ol.source.Zoomify({
|
||||
url: zoomifyUrl,
|
||||
size: size,
|
||||
tileSize: 1024
|
||||
});
|
||||
}
|
||||
|
||||
describe('constructor', function() {
|
||||
|
||||
@@ -148,6 +156,14 @@ describe('ol.source.Zoomify', function() {
|
||||
}
|
||||
});
|
||||
|
||||
it('has expected tileSize', function() {
|
||||
var sources = [getZoomifySource(), getZoomifySourceWith1024pxTiles()];
|
||||
var expectedTileSizes = [ol.DEFAULT_TILE_SIZE, 1024];
|
||||
for (var i = 0; i < sources.length; i++) {
|
||||
var tileGrid = sources[i].getTileGrid();
|
||||
expect(tileGrid.getTileSize()).to.eql(expectedTileSizes[i]);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('tierSizeCalculation configuration', function() {
|
||||
|
||||
Reference in New Issue
Block a user