1
0
Fork 0
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:
Fred Chasen 2016-12-06 23:54:54 +01:00
parent 85c23fca69
commit ba3eec0885

View file

@ -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);
} }