View Single Post
Old 06-12-2021, 11:15 AM   #49
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,932
Karma: 6361444
Join Date: Nov 2009
Device: many
If you want to play around with the workaround, edit epub.js in the reader folder and look for a routine called "adjustImages" near line 10655

In that routine you will see this line:

let horizontalPadding = parseFloat(computed.paddingLeft) + parseFloat(computed.paddingRight);

But this horizontalPadding is incorrect in two page spread mode.

To workaround it just after that line I added the following:

+ if (this._layout.divisor > 1) {
+ horizontalPadding = 0;
+ }

This seems to fix the problem but will probably not work when images are floated either left or right.
KevinH is online now   Reply With Quote