()
| 2324 | } |
| 2325 | |
| 2326 | function zoomScrollHeight() |
| 2327 | { |
| 2328 | if(scalePrevData.scale != 1 && config.readingGlobalZoom && readingViewIs('scroll')) |
| 2329 | { |
| 2330 | let contentRight = template._contentRight(); |
| 2331 | let readingBody = contentRight.querySelector('.reading-body'); |
| 2332 | let readingBodyChild = readingBody.firstElementChild; |
| 2333 | |
| 2334 | let content = contentRight.firstElementChild; |
| 2335 | |
| 2336 | let newRect = readingBody.getBoundingClientRect(); |
| 2337 | let childRect = readingBodyChild.getBoundingClientRect(); |
| 2338 | originalRectReadingBody = content.getBoundingClientRect(); |
| 2339 | |
| 2340 | let diff = childRect.height / originalRect2.height; |
| 2341 | |
| 2342 | originalRect = { |
| 2343 | width: diff * originalRect.width, |
| 2344 | height: diff * originalRect.height, |
| 2345 | left: newRect.left, |
| 2346 | top: newRect.top, |
| 2347 | }; |
| 2348 | |
| 2349 | originalRect2 = { |
| 2350 | width: originalRect.width, |
| 2351 | height: childRect.height, |
| 2352 | left: newRect.left, |
| 2353 | top: newRect.top, |
| 2354 | }; |
| 2355 | |
| 2356 | if(!readingBody.classList.contains('zooming')) |
| 2357 | { |
| 2358 | dom.this(contentRight).find('.reading-body').css({ |
| 2359 | height: childRect.height+'px', |
| 2360 | }); |
| 2361 | } |
| 2362 | } |
| 2363 | } |
| 2364 | |
| 2365 | // Zoom in |
| 2366 | function zoomIn(animation = true, center = false, delta = false) |
no test coverage detected