mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Changed iframe height and width to use original settings
This commit is contained in:
parent
d8de993c94
commit
8e66bdc57e
5 changed files with 17 additions and 9 deletions
|
@ -5821,9 +5821,9 @@ EPUBJS.Render.Iframe.prototype.addIframe = function(){
|
|||
|
||||
this.iframe.addEventListener("load", this.loaded.bind(this), false);
|
||||
|
||||
if (this.width || this.height) {
|
||||
this.iframe.height = this.height;
|
||||
this.iframe.width = this.width;
|
||||
if (this._width || this._height) {
|
||||
this.iframe.height = this._height;
|
||||
this.iframe.width = this._width;
|
||||
}
|
||||
return this.iframe;
|
||||
};
|
||||
|
@ -5934,6 +5934,10 @@ EPUBJS.Render.Iframe.prototype.resize = function(width, height){
|
|||
this.iframe.width = width;
|
||||
}
|
||||
|
||||
// Set the width for the iframe
|
||||
this._height = height;
|
||||
this._width = width;
|
||||
|
||||
// Get the fractional height and width of the iframe
|
||||
// Default to orginal if bounding rect is 0
|
||||
this.width = this.element.getBoundingClientRect().width || width;
|
||||
|
|
File diff suppressed because one or more lines are too long
2
build/epub.min.js
vendored
2
build/epub.min.js
vendored
File diff suppressed because one or more lines are too long
2
reader/js/epub.min.js
vendored
2
reader/js/epub.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -31,9 +31,9 @@ EPUBJS.Render.Iframe.prototype.addIframe = function(){
|
|||
|
||||
this.iframe.addEventListener("load", this.loaded.bind(this), false);
|
||||
|
||||
if (this.width || this.height) {
|
||||
this.iframe.height = this.height;
|
||||
this.iframe.width = this.width;
|
||||
if (this._width || this._height) {
|
||||
this.iframe.height = this._height;
|
||||
this.iframe.width = this._width;
|
||||
}
|
||||
return this.iframe;
|
||||
};
|
||||
|
@ -144,6 +144,10 @@ EPUBJS.Render.Iframe.prototype.resize = function(width, height){
|
|||
this.iframe.width = width;
|
||||
}
|
||||
|
||||
// Set the width for the iframe
|
||||
this._height = height;
|
||||
this._width = width;
|
||||
|
||||
// Get the fractional height and width of the iframe
|
||||
// Default to orginal if bounding rect is 0
|
||||
this.width = this.element.getBoundingClientRect().width || width;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue