1
0
Fork 0
mirror of https://github.com/futurepress/epub.js.git synced 2025-10-04 15:09:16 +02:00

Added relocated event

This commit is contained in:
Fred Chasen 2017-07-10 17:25:26 -04:00
parent aa9c2535d9
commit 3f4d7bbbf2
18 changed files with 250 additions and 58 deletions

View file

@ -24,8 +24,8 @@ class IframeView {
this.displayed = false;
this.rendered = false;
this.width = this.settings.width;
this.height = this.settings.height;
// this.width = this.settings.width;
// this.height = this.settings.height;
this.fixedWidth = 0;
this.fixedHeight = 0;
@ -536,6 +536,21 @@ class IframeView {
this.emit("hidden", this);
}
offset() {
return {
top: this.element.offsetTop,
left: this.element.offsetLeft
}
}
width() {
return this._width;
}
height() {
return this._height;
}
position() {
return this.element.getBoundingClientRect();
}