mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-04 15:09:16 +02:00
Fixed undefined offset in default viewManager display
This commit is contained in:
parent
85c23fca69
commit
ba3eec0885
1 changed files with 2 additions and 2 deletions
|
@ -148,7 +148,7 @@ class DefaultViewManager {
|
||||||
|
|
||||||
// View is already shown, just move to correct location
|
// View is already shown, just move to correct location
|
||||||
if(visible && target) {
|
if(visible && target) {
|
||||||
offset = visible.locationOf(target);
|
let offset = visible.locationOf(target);
|
||||||
this.moveTo(offset);
|
this.moveTo(offset);
|
||||||
displaying.resolve();
|
displaying.resolve();
|
||||||
return displayed;
|
return displayed;
|
||||||
|
@ -164,7 +164,7 @@ class DefaultViewManager {
|
||||||
|
|
||||||
// Move to correct place within the section, if needed
|
// Move to correct place within the section, if needed
|
||||||
if(target) {
|
if(target) {
|
||||||
offset = view.locationOf(target);
|
let offset = view.locationOf(target);
|
||||||
this.moveTo(offset);
|
this.moveTo(offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue