@d-i-t-a/reader 1.11.1 → 1.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { Publication } from "../../model/Publication";
|
|
2
|
+
import IFrameNavigator from "../../navigator/IFrameNavigator";
|
|
3
|
+
import ReaderModule from "../ReaderModule";
|
|
4
|
+
import TextHighlighter from "../highlight/TextHighlighter";
|
|
5
|
+
export interface LineFocusModuleAPI {
|
|
6
|
+
}
|
|
7
|
+
export interface LineFocusModuleProperties {
|
|
8
|
+
api?: LineFocusModuleAPI;
|
|
9
|
+
lines: number;
|
|
10
|
+
}
|
|
11
|
+
export interface LineFocusModuleConfig extends LineFocusModuleProperties {
|
|
12
|
+
api: LineFocusModuleAPI;
|
|
13
|
+
publication: Publication;
|
|
14
|
+
delegate: IFrameNavigator;
|
|
15
|
+
highlighter: TextHighlighter;
|
|
16
|
+
}
|
|
17
|
+
export default class LineFocusModule implements ReaderModule {
|
|
18
|
+
properties: LineFocusModuleProperties;
|
|
19
|
+
api: LineFocusModuleAPI;
|
|
20
|
+
private delegate;
|
|
21
|
+
private highlighter;
|
|
22
|
+
lines: Array<HTMLElement>;
|
|
23
|
+
index: number;
|
|
24
|
+
isActive: boolean;
|
|
25
|
+
isDebug: boolean;
|
|
26
|
+
lineFocusContainer: HTMLElement;
|
|
27
|
+
lineFocusTopBlinder: HTMLElement;
|
|
28
|
+
lineFocusBottomBlinder: HTMLElement;
|
|
29
|
+
static create(config: LineFocusModuleConfig): Promise<LineFocusModule>;
|
|
30
|
+
private constructor();
|
|
31
|
+
stop(): Promise<void>;
|
|
32
|
+
protected start(): Promise<void>;
|
|
33
|
+
handleResize(): void;
|
|
34
|
+
enableLineFocus(): Promise<void>;
|
|
35
|
+
disableLineFocus(): void;
|
|
36
|
+
lineFocus(): void;
|
|
37
|
+
currentLine(): void;
|
|
38
|
+
lineDown(): void;
|
|
39
|
+
lineUp(): void;
|
|
40
|
+
almostEqual(a: number, b: number, tolerance: number): boolean;
|
|
41
|
+
findRects(parent: HTMLElement): any;
|
|
42
|
+
findTextNodes(parentElement: Element, nodes?: Array<Element>): Array<Element>;
|
|
43
|
+
measureTextNodes(node: Element): any;
|
|
44
|
+
}
|