1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-03 14:59:18 +02:00

Updated expanding, and resize

This commit is contained in:
Fred Chasen 2015-05-19 00:02:18 -04:00
parent a574c68975
commit 1f7a4a2ccf
9 changed files with 362 additions and 256 deletions

View file

@ -27,8 +27,9 @@ EPUBJS.Continuous.prototype.constructor = EPUBJS.Continuous;
EPUBJS.Continuous.prototype.attachListeners = function(){
// Listen to window for resize event if width or height is set to 100%
if(this.settings.width === "100%" || this.settings.height === "100%") {
// Listen to window for resize event if width or height is set to a percent
if(!EPUBJS.core.isNumber(this.settings.width) ||
!EPUBJS.core.isNumber(this.settings.height) ) {
window.addEventListener("resize", this.onResized.bind(this), false);
}