Skip to content

Commit

Permalink
Fix: Override onInview function (fixes #76)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Jan 14, 2025
2 parents b894239 + ee73986 commit e9729c7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions js/PageNavView.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ class PageNavView extends ComponentView {
this.setupTooltips();
};

onInview(event, visible, visiblePartX, visiblePartY) {
if (!visible) return;
if (visiblePartY === 'top') this.hasSeenTop = true;
if (!this.hasSeenTop) return;

this.inviewCallback();

if (!this.model.get('_isComplete')) return;
this.removeInviewListener();
}

onContentObjectComplete() {
// Update model so that _lockUntilPageComplete works properly
this.model.setupItemsModel();
Expand Down

0 comments on commit e9729c7

Please sign in to comment.