mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 06:36:11 +03:00
Modify the unit test for changing maxLevel
This commit is contained in:
parent
7686812336
commit
3bde256d62
@ -128,8 +128,6 @@
|
||||
|
||||
assert.equal(tileSource.maxLevel, 12, 'The initial max level should be 12.');
|
||||
|
||||
tileSource.maxLevel = 9;
|
||||
|
||||
function assertLevelScale(level, expected) {
|
||||
var actual = tileSource.getLevelScale(level);
|
||||
assert.ok(Math.abs(actual - expected) < Number.EPSILON, "The scale at level " + level +
|
||||
@ -141,6 +139,13 @@
|
||||
assertLevelScale(10, 1 / 4);
|
||||
assertLevelScale(8, 1 / 16);
|
||||
assertLevelScale(6, 1 / 64);
|
||||
|
||||
tileSource.setMaxLevel(9);
|
||||
|
||||
assertLevelScale(9, 1);
|
||||
assertLevelScale(7, 1 / 4);
|
||||
assertLevelScale(5, 1 / 16);
|
||||
assertLevelScale(3, 1 / 64);
|
||||
});
|
||||
|
||||
}());
|
||||
|
Loading…
Reference in New Issue
Block a user