mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
update the comments and unit test
This commit is contained in:
parent
0c662b8a8d
commit
ab82783cf1
@ -92,7 +92,7 @@ $.EventHandler.prototype = {
|
||||
|
||||
/**
|
||||
* Remove all event handlers for a given event type. If no type is given all
|
||||
* event handlers for every event type is removed.
|
||||
* event handlers for every event type are removed.
|
||||
* @function
|
||||
* @param {String} eventName - Name of event for which all handlers are to be removed.
|
||||
*/
|
||||
|
@ -211,13 +211,13 @@
|
||||
// ----------
|
||||
asyncTest('Destroy', function() {
|
||||
viewer.addHandler("open", function () {
|
||||
start();
|
||||
// Check that the DOM has been modified
|
||||
notEqual(0, $('#example').children().length);
|
||||
|
||||
var closeCalled = false;
|
||||
var closeHandler = function() {
|
||||
viewer.removeHandler('close', closeHandler);
|
||||
ok(true, 'Close event was sent on Destroy');
|
||||
closeCalled = true;
|
||||
};
|
||||
|
||||
viewer.addHandler('close', closeHandler);
|
||||
@ -229,6 +229,8 @@
|
||||
equal(null, viewer.keyboardCommandArea);
|
||||
equal(null, viewer.container);
|
||||
equal(null, viewer.element);
|
||||
equal(true, closeCalled);
|
||||
start();
|
||||
});
|
||||
viewer.open('/test/data/testpattern.dzi');
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user