mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-27 07:36:09 +03:00
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
|
/* global module, asyncTest, $, ok, equal, notEqual, start, test, Util, testLog */
|
||
|
|
||
|
(function() {
|
||
|
var viewer;
|
||
|
|
||
|
module('ReferenceStrip', {
|
||
|
setup: function () {
|
||
|
var example = $('<div id="example"></div>').appendTo("#qunit-fixture");
|
||
|
|
||
|
testLog.reset();
|
||
|
},
|
||
|
teardown: function () {
|
||
|
if (viewer && viewer.close) {
|
||
|
viewer.close();
|
||
|
}
|
||
|
|
||
|
viewer = null;
|
||
|
}
|
||
|
});
|
||
|
|
||
|
// ----------
|
||
|
var createViewer = function(options) {
|
||
|
options = options || {};
|
||
|
viewer = OpenSeadragon(OpenSeadragon.extend({
|
||
|
id: 'example',
|
||
|
prefixUrl: '/build/openseadragon/images/',
|
||
|
springStiffness: 100 // Faster animation = faster tests
|
||
|
}, options));
|
||
|
};
|
||
|
|
||
|
// ----------
|
||
|
asyncTest('basics', function() {
|
||
|
createViewer({
|
||
|
sequenceMode: true,
|
||
|
showReferenceStrip: true,
|
||
|
tileSources: [
|
||
|
'/test/data/tall.dzi',
|
||
|
'/test/data/wide.dzi',
|
||
|
]
|
||
|
});
|
||
|
|
||
|
ok(viewer.referenceStrip, 'referenceStrip exists');
|
||
|
start();
|
||
|
});
|
||
|
|
||
|
})();
|