Skip to content

Commit

Permalink
Fix positioning during page flip for large books (#1078)
Browse files Browse the repository at this point in the history
Large books with leaf edges had weird page offsets/shifts during the
page flip animation as a result of the previous anim fix (#1077).
This change ensures the page is positioned correctly throughout the
animation regardless of whether leaf edges are present.
  • Loading branch information
latonv authored Aug 16, 2022
1 parent 6bd718f commit 289e3c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/BookReader/Mode2Up.js
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ export class Mode2Up {
// Ensure the new left leaf is right-positioned before animating its width.
// Otherwise, it animates in the wrong direction.
this.pageContainers[newIndexL].$container.css({
right: `${newWidthL}px`,
right: `${$twoPageViewEl.prop('clientWidth') - gutter}px`,
left: ''
});
this.pageContainers[newIndexL].$container.animate({width: `${newWidthL}px`}, speed, 'easeOutSine', () => {
Expand Down

0 comments on commit 289e3c7

Please sign in to comment.