Skip to content

Commit

Permalink
fix last slide not triggering slidechange in scroll view (closes #3715)
Browse files Browse the repository at this point in the history
  • Loading branch information
hakimel committed Nov 11, 2024
1 parent 5a275f2 commit fe4a6e8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/reveal.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.esm.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/reveal.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions js/controllers/scrollview.js
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,10 @@ export default class ScrollView {
rangeStart = trigger.range[1];
} );

// Ensure the last trigger extends to the end of the page, otherwise
// rounding errors can cause the last trigger to end at 0.999999...
this.slideTriggers[this.slideTriggers.length - 1].range[1] = 1;

}

/**
Expand Down

0 comments on commit fe4a6e8

Please sign in to comment.