Open JayPanoz opened 1 month ago
I want to note, this function is from the kotlin-toolkit:
That’s an important note. Thanks.
As @HadrienGardeur stated during the call yesterday, other toolkits may differ and not do more than 2 columns but I guess it would be a good idea to make sure everyone involved is aware of this issue and its developments, especially as it adds complexity to a tried and tested solution.
In theory adding as many virtual pages as needed depending on the number of columns should work, but there are possible side effects we’re not aware of yet.
Navigator-html-injectables has an helper that inserts a blank virtual column at the end of the resource to fix snapping and page turning issues caused by an odd number of columns when displaying two columns.
In ReadiumCSS version 2, the number of displayed columns is no longer constrained so the helper should take that into account and be updated.
For reference, the current function.
https://github.com/readium/ts-toolkit/blob/2a44a91b1339f7dbfe83c43ab838a6aebc4c8c4e/navigator-html-injectables/src/helpers/document.ts#L19-L43
Comments on anticipated challenges and issues, alternative ideas, etc. welcome. Now is probably the best time to revisit it.