mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Fix tests
This commit is contained in:
parent
10dd723637
commit
6370a6bafa
@ -347,7 +347,7 @@ $.TileSource.prototype = {
|
|||||||
getTileAtPoint: function(level, point) {
|
getTileAtPoint: function(level, point) {
|
||||||
var validPoint = point.x >= 0 && point.x <= 1 &&
|
var validPoint = point.x >= 0 && point.x <= 1 &&
|
||||||
point.y >= 0 && point.y <= 1 / this.aspectRatio;
|
point.y >= 0 && point.y <= 1 / this.aspectRatio;
|
||||||
$.console.assert(validPoint, "[TileSource.getTileAtPoint] called with invalid point " + point.toString());
|
$.console.assert(validPoint, "[TileSource.getTileAtPoint] must be called with a valid point.");
|
||||||
|
|
||||||
var widthScaled = this.dimensions.x * this.getLevelScale(level);
|
var widthScaled = this.dimensions.x * this.getLevelScale(level);
|
||||||
var pixelX = point.x * widthScaled;
|
var pixelX = point.x * widthScaled;
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
<script src="/src/iiiftilesource.js"></script>
|
<script src="/src/iiiftilesource.js"></script>
|
||||||
<script src="/src/osmtilesource.js"></script>
|
<script src="/src/osmtilesource.js"></script>
|
||||||
<script src="/src/tmstilesource.js"></script>
|
<script src="/src/tmstilesource.js"></script>
|
||||||
|
<script src="/src/zoomifytilesource.js"></script>
|
||||||
<script src="/src/legacytilesource.js"></script>
|
<script src="/src/legacytilesource.js"></script>
|
||||||
<script src="/src/imagetilesource.js"></script>
|
<script src="/src/imagetilesource.js"></script>
|
||||||
<script src="/src/tilesourcecollection.js"></script>
|
<script src="/src/tilesourcecollection.js"></script>
|
||||||
|
@ -331,7 +331,7 @@
|
|||||||
height: 155
|
height: 155
|
||||||
} ]
|
} ]
|
||||||
} );
|
} );
|
||||||
viewer.addHandler('tile-drawn', function() {
|
viewer.addOnceHandler('tile-drawn', function() {
|
||||||
ok(OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
ok(OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
||||||
"Canvas should be tainted.");
|
"Canvas should be tainted.");
|
||||||
start();
|
start();
|
||||||
@ -355,7 +355,7 @@
|
|||||||
height: 155
|
height: 155
|
||||||
} ]
|
} ]
|
||||||
} );
|
} );
|
||||||
viewer.addHandler('tile-drawn', function() {
|
viewer.addOnceHandler('tile-drawn', function() {
|
||||||
ok(!OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
ok(!OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
||||||
"Canvas should not be tainted.");
|
"Canvas should not be tainted.");
|
||||||
start();
|
start();
|
||||||
@ -385,7 +385,7 @@
|
|||||||
},
|
},
|
||||||
crossOriginPolicy : false
|
crossOriginPolicy : false
|
||||||
} );
|
} );
|
||||||
viewer.addHandler('tile-drawn', function() {
|
viewer.addOnceHandler('tile-drawn', function() {
|
||||||
ok(OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
ok(OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
||||||
"Canvas should be tainted.");
|
"Canvas should be tainted.");
|
||||||
start();
|
start();
|
||||||
@ -414,7 +414,7 @@
|
|||||||
crossOriginPolicy : "Anonymous"
|
crossOriginPolicy : "Anonymous"
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
viewer.addHandler('tile-drawn', function() {
|
viewer.addOnceHandler('tile-drawn', function() {
|
||||||
ok(!OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
ok(!OpenSeadragon.isCanvasTainted(viewer.drawer.context.canvas),
|
||||||
"Canvas should not be tainted.");
|
"Canvas should not be tainted.");
|
||||||
start();
|
start();
|
||||||
|
Loading…
Reference in New Issue
Block a user