Prevent unplaceable node loops
Prevents infinite looping when laying out a node fails and can't be fit onto a page, or when an element always overflows and triggers continuous overflow events.
- Adds a
BreakToken
class, with comparisons methods. This will still need to evolve a bit to handle more complex breaking. - Adds a check based on https://gitlab.pagedmedia.org/tools/pagedjs/merge_requests/89/ to stop creating new pages if the breakToken equals the previous one.
- use
displayedElementBefore
to find previous nodes with breaks
Should be a good first step towards overhauling the Chunker fragmentation.