Skip to content

Commit

Permalink
FXL: fix spreads when first section is center
Browse files Browse the repository at this point in the history
  • Loading branch information
johnfactotum committed Sep 9, 2023
1 parent 99e246e commit 0cebcb9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fixed-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ export class FixedLayout extends HTMLElement {
arr.push(spread)
return spread
}
if (pageSpread === 'center') newSpread().center = section
if (pageSpread === 'center') {
const spread = last.left || last.right ? newSpread() : last
spread.center = section
}
else if (pageSpread === 'left') {
const spread = last.center || last.left || ltr ? newSpread() : last
spread.left = section
Expand Down

0 comments on commit 0cebcb9

Please sign in to comment.