(readingEbook = false, resize = false)
| 4464 | } |
| 4465 | |
| 4466 | async function fastUpdateEbookPages(readingEbook = false, resize = false) |
| 4467 | { |
| 4468 | if(!readingIsEbook) return; |
| 4469 | |
| 4470 | let ebookConfig = await getEbookConfig(readingEbook); |
| 4471 | |
| 4472 | for(let index in imagesData) |
| 4473 | { |
| 4474 | imagesData[index].width = ebookConfig.width; |
| 4475 | imagesData[index].height = ebookConfig.height; |
| 4476 | imagesData[index].aspectRatio = ebookConfig.width / ebookConfig.height; |
| 4477 | } |
| 4478 | |
| 4479 | if(resize) |
| 4480 | { |
| 4481 | disposeImages(); |
| 4482 | calculateView(); |
| 4483 | stayInLine(); |
| 4484 | } |
| 4485 | |
| 4486 | if(_ebook) |
| 4487 | { |
| 4488 | _ebook.updateConfig(ebookConfig); |
| 4489 | render.setEbookConfigChanged(ebookConfig); |
| 4490 | |
| 4491 | let iframes = template._contentRight().querySelectorAll('oc-img iframe'); |
| 4492 | |
| 4493 | for(let i = 0, len = iframes.length; i < len; i++) |
| 4494 | { |
| 4495 | let iframe = iframes[i]; |
| 4496 | await _ebook.applyConfigToHtml(iframe.contentDocument); |
| 4497 | } |
| 4498 | } |
| 4499 | } |
| 4500 | |
| 4501 | var hasGenerateEbookPages = false; |
| 4502 |
no test coverage detected