mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 08:36:10 +03:00
Aspect ratio test
This commit is contained in:
parent
f765ab9933
commit
ca7f79c896
@ -63,13 +63,26 @@
|
|||||||
viewer.open(DZI_PATH);
|
viewer.open(DZI_PATH);
|
||||||
});
|
});
|
||||||
*/
|
*/
|
||||||
|
asyncTest('getAspectRatio', function() {
|
||||||
|
var openHandler = function(event) {
|
||||||
|
viewer.removeHandler('open', openHandler);
|
||||||
|
var viewport = viewer.viewport;
|
||||||
|
viewport.zoomTo(ZOOM_FACTOR, null, true);
|
||||||
|
|
||||||
|
equal(viewport.getAspectRatio(), 1, "Test aspect ratio")
|
||||||
|
start();
|
||||||
|
};
|
||||||
|
viewer.addHandler('open', openHandler);
|
||||||
|
viewer.open(DZI_PATH);
|
||||||
|
});
|
||||||
|
|
||||||
asyncTest('getMinZoomDefault', function() {
|
asyncTest('getMinZoomDefault', function() {
|
||||||
var openHandler = function(event) {
|
var openHandler = function(event) {
|
||||||
viewer.removeHandler('open', openHandler);
|
viewer.removeHandler('open', openHandler);
|
||||||
var viewport = viewer.viewport;
|
var viewport = viewer.viewport;
|
||||||
viewport.zoomTo(ZOOM_FACTOR, null, true);
|
viewport.zoomTo(ZOOM_FACTOR, null, true);
|
||||||
|
|
||||||
equal(viewport.getMinZoom(), .9, "Test min zoom level")
|
equal(viewport.getMinZoom(), .9, "Test default min zoom level")
|
||||||
start();
|
start();
|
||||||
};
|
};
|
||||||
viewer.addHandler('open', openHandler);
|
viewer.addHandler('open', openHandler);
|
||||||
@ -82,7 +95,7 @@
|
|||||||
var viewport = viewer.viewport;
|
var viewport = viewer.viewport;
|
||||||
viewport.zoomTo(ZOOM_FACTOR, null, true);
|
viewport.zoomTo(ZOOM_FACTOR, null, true);
|
||||||
|
|
||||||
equal(viewport.getMaxZoom(), 2.2, "Test max zoom level")
|
equal(viewport.getMaxZoom(), 2.2, "Test default max zoom level")
|
||||||
start();
|
start();
|
||||||
};
|
};
|
||||||
viewer.addHandler('open', openHandler);
|
viewer.addHandler('open', openHandler);
|
||||||
|
Loading…
Reference in New Issue
Block a user