added destroy method
This commit is contained in:
parent
71aceb4ef0
commit
d53dc0fc9b
3 changed files with 45 additions and 30 deletions
|
@ -894,4 +894,16 @@ function ComicBook(id, srcs, opts) {
|
|||
}
|
||||
};
|
||||
|
||||
ComicBook.prototype.destroy = function () {
|
||||
|
||||
$("#cb-loading-overlay, #cb-status, #cb-color, .cb-control, .cb-toolbar, #cb-width-shiv").remove();
|
||||
canvas.width = 0;
|
||||
canvas.height = 0;
|
||||
window.removeEventListener("keydown", ComicBook.prototype.navigation, false);
|
||||
window.removeEventListener("hashchange", checkHash, false);
|
||||
setHash('');
|
||||
|
||||
$(this).trigger("destroy");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue