@readium/navigator-html-injectables
Version:
An embeddable solution for connecting frames of HTML publications with a Readium Navigator
27 lines (26 loc) • 1.16 kB
TypeScript
import { ReadiumWindow } from "./dom";
export declare function isRTL(wnd: ReadiumWindow): boolean;
export declare function getColumnCountPerScreen(wnd: ReadiumWindow): number;
/**
* Returns the "content height" of an element, which is its clientHeight
* minus any vertical padding.
*
* @param el - The element to measure.
*/
export declare function getContentHeight(el: Element): number;
/**
* We have to make sure that the total number of columns is a multiple
* of the number of columns per screen.
* Otherwise it causes snapping and page turning issues.
* To fix this, we insert and remove blank virtual columns at the end of the resource.
*/
export declare function appendVirtualColumnIfNeeded(wnd: ReadiumWindow): boolean;
/**
* This forces a recalculation in WebKit browsers.
* It is needed in scroll mode to ensure that the content is scrollable.
* Webkit seems to find itself in some kind of limbo if we do not do that.
* It has everything correct but the scroll listener is non-functional,
* unless you force a recalc or reflow.
* It is not needed in paginated mode.
*/
export declare function forceWebkitRecalc(wnd: ReadiumWindow): void;