readium.reader.setBookStyle(styles) dosen't update the current content displayed accordingly.
hz0324 opened this issue · 3 comments
I am using the setBookStyle() API to change the fontSize of the book, as following.
The problem is, after running these code, no change happened on the content that are displayed on the screen, but if you change to another chapter using toc, the change become effective.
How to solve this problem?
Please help.
Thanks
PS: the default fontSize is 16.
Use this.readium.reader.updateSettings(val);
, with val
=
{
fontSize: data,
syntheticSpread: "auto", // other values allowed, this is just an example
columnGap: 60, // other values allowed, this is just an example
columnMaxWidth: 700, // other values allowed, this is just an example
scroll: "auto" // other values allowed, this is just an example
}
See:
https://github.com/readium/readium-shared-js/blob/develop/js/models/viewer_settings.js#L32
https://github.com/readium/readium-shared-js/blob/develop/js/views/reader_view.js#L560
https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L147
vs.
https://github.com/readium/readium-shared-js/blob/develop/js/views/reader_view.js#L834
https://github.com/readium/readium-shared-js/blob/develop/js/views/reflowable_view.js#L390
Thank you very much