@hufe921/canvas-editor 0.9.14 → 0.9.16
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.
- package/LICENSE +20 -20
- package/README.md +54 -54
- package/dist/canvas-editor.es.js +155 -50
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +9 -9
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/command/Command.d.ts +150 -150
- package/dist/src/editor/core/command/CommandAdapt.d.ts +93 -93
- package/dist/src/editor/core/contextmenu/ContextMenu.d.ts +28 -28
- package/dist/src/editor/core/contextmenu/menus/controlMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/globalMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/hyperlinkMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/imageMenus.d.ts +2 -2
- package/dist/src/editor/core/contextmenu/menus/tableMenus.d.ts +2 -2
- package/dist/src/editor/core/cursor/Cursor.d.ts +17 -15
- package/dist/src/editor/core/cursor/CursorAgent.d.ts +15 -15
- package/dist/src/editor/core/draw/Draw.d.ts +143 -142
- package/dist/src/editor/core/draw/control/Control.d.ts +35 -35
- package/dist/src/editor/core/draw/control/checkbox/CheckboxControl.d.ts +15 -15
- package/dist/src/editor/core/draw/control/select/SelectControl.d.ts +21 -21
- package/dist/src/editor/core/draw/control/text/TextControl.d.ts +13 -13
- package/dist/src/editor/core/draw/frame/Background.d.ts +6 -6
- package/dist/src/editor/core/draw/frame/Header.d.ts +7 -7
- package/dist/src/editor/core/draw/frame/Margin.d.ts +7 -7
- package/dist/src/editor/core/draw/frame/PageNumber.d.ts +7 -7
- package/dist/src/editor/core/draw/frame/Watermark.d.ts +7 -7
- package/dist/src/editor/core/draw/interactive/Search.d.ts +26 -26
- package/dist/src/editor/core/draw/particle/CheckboxParticle.d.ts +7 -7
- package/dist/src/editor/core/draw/particle/HyperlinkParticle.d.ts +16 -16
- package/dist/src/editor/core/draw/particle/ImageParticle.d.ts +9 -9
- package/dist/src/editor/core/draw/particle/PageBreak.d.ts +12 -12
- package/dist/src/editor/core/draw/particle/Separator.d.ts +4 -4
- package/dist/src/editor/core/draw/particle/Subscript.d.ts +4 -4
- package/dist/src/editor/core/draw/particle/Superscript.d.ts +4 -4
- package/dist/src/editor/core/draw/particle/TextParticle.d.ts +18 -18
- package/dist/src/editor/core/draw/particle/block/BlockParticle.d.ts +14 -14
- package/dist/src/editor/core/draw/particle/block/modules/BaseBlock.d.ts +15 -15
- package/dist/src/editor/core/draw/particle/block/modules/IFrameBlock.d.ts +7 -7
- package/dist/src/editor/core/draw/particle/block/modules/VideoBlock.d.ts +6 -6
- package/dist/src/editor/core/draw/particle/date/DateParticle.d.ts +14 -14
- package/dist/src/editor/core/draw/particle/date/DatePicker.d.ts +64 -64
- package/dist/src/editor/core/draw/particle/latex/LaTexParticle.d.ts +7 -7
- package/dist/src/editor/core/draw/particle/latex/utils/LaTexUtils.d.ts +47 -47
- package/dist/src/editor/core/draw/particle/latex/utils/hershey.d.ts +10 -10
- package/dist/src/editor/core/draw/particle/latex/utils/symbols.d.ts +8 -8
- package/dist/src/editor/core/draw/particle/previewer/Previewer.d.ts +34 -34
- package/dist/src/editor/core/draw/particle/table/TableParticle.d.ts +11 -11
- package/dist/src/editor/core/draw/particle/table/TableTool.d.ts +22 -22
- package/dist/src/editor/core/draw/richtext/AbstractRichText.d.ts +14 -14
- package/dist/src/editor/core/draw/richtext/Highlight.d.ts +7 -7
- package/dist/src/editor/core/draw/richtext/Strikeout.d.ts +7 -7
- package/dist/src/editor/core/draw/richtext/Underline.d.ts +7 -7
- package/dist/src/editor/core/event/CanvasEvent.d.ts +48 -41
- package/dist/src/editor/core/event/GlobalEvent.d.ts +26 -24
- package/dist/src/editor/core/event/handlers/click.d.ts +8 -8
- package/dist/src/editor/core/event/handlers/composition.d.ts +8 -8
- package/dist/src/editor/core/event/handlers/copy.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/cut.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/drag.d.ts +6 -6
- package/dist/src/editor/core/event/handlers/drop.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/input.d.ts +3 -2
- package/dist/src/editor/core/event/handlers/keydown.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mousedown.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mouseleave.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mousemove.d.ts +2 -2
- package/dist/src/editor/core/event/handlers/mouseup.d.ts +2 -2
- package/dist/src/editor/core/history/HistoryManager.d.ts +10 -10
- package/dist/src/editor/core/i18n/I18n.d.ts +10 -9
- package/dist/src/editor/core/listener/Listener.d.ts +13 -13
- package/dist/src/editor/core/observer/ScrollObserver.d.ts +11 -11
- package/dist/src/editor/core/observer/SelectionObserver.d.ts +18 -18
- package/dist/src/editor/core/position/Position.d.ts +20 -20
- package/dist/src/editor/core/range/RangeManager.d.ts +22 -22
- package/dist/src/editor/core/register/Register.d.ts +19 -18
- package/dist/src/editor/core/shortcut/Shortcut.d.ts +16 -16
- package/dist/src/editor/core/shortcut/keys/richtextKeys.d.ts +2 -2
- package/dist/src/editor/core/worker/WorkerManager.d.ts +7 -7
- package/dist/src/editor/core/worker/works/wordCount.d.ts +1 -1
- package/dist/src/editor/dataset/constant/Checkbox.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Common.d.ts +4 -4
- package/dist/src/editor/dataset/constant/ContextMenu.d.ts +3 -3
- package/dist/src/editor/dataset/constant/Control.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Cursor.d.ts +1 -1
- package/dist/src/editor/dataset/constant/Editor.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Element.d.ts +6 -6
- package/dist/src/editor/dataset/constant/Header.d.ts +2 -2
- package/dist/src/editor/dataset/constant/Regular.d.ts +4 -4
- package/dist/src/editor/dataset/constant/Watermark.d.ts +2 -2
- package/dist/src/editor/dataset/enum/Block.d.ts +4 -4
- package/dist/src/editor/dataset/enum/Control.d.ts +16 -16
- package/dist/src/editor/dataset/enum/Editor.d.ts +21 -21
- package/dist/src/editor/dataset/enum/Element.d.ts +16 -16
- package/dist/src/editor/dataset/enum/ElementStyle.d.ts +12 -12
- package/dist/src/editor/dataset/enum/Event.d.ts +5 -5
- package/dist/src/editor/dataset/enum/KeyMap.d.ts +83 -82
- package/dist/src/editor/dataset/enum/Observer.d.ts +6 -6
- package/dist/src/editor/dataset/enum/Row.d.ts +6 -6
- package/dist/src/editor/dataset/enum/table/TableTool.d.ts +4 -4
- package/dist/src/editor/index.d.ts +27 -27
- package/dist/src/editor/interface/Block.d.ts +12 -12
- package/dist/src/editor/interface/Checkbox.d.ts +13 -13
- package/dist/src/editor/interface/Common.d.ts +8 -5
- package/dist/src/editor/interface/Control.d.ts +50 -50
- package/dist/src/editor/interface/Draw.d.ts +30 -30
- package/dist/src/editor/interface/Editor.d.ts +55 -55
- package/dist/src/editor/interface/Element.d.ts +99 -99
- package/dist/src/editor/interface/Header.d.ts +6 -6
- package/dist/src/editor/interface/Listener.d.ts +29 -29
- package/dist/src/editor/interface/Margin.d.ts +1 -1
- package/dist/src/editor/interface/Position.d.ts +37 -37
- package/dist/src/editor/interface/Previewer.d.ts +11 -11
- package/dist/src/editor/interface/Range.d.ts +11 -11
- package/dist/src/editor/interface/Row.d.ts +14 -14
- package/dist/src/editor/interface/Search.d.ts +14 -14
- package/dist/src/editor/interface/Watermark.d.ts +7 -7
- package/dist/src/editor/interface/contextmenu/ContextMenu.d.ts +60 -60
- package/dist/src/editor/interface/i18n/I18n.d.ts +6 -6
- package/dist/src/editor/interface/shortcut/Shortcut.d.ts +12 -10
- package/dist/src/editor/interface/table/Colgroup.d.ts +4 -4
- package/dist/src/editor/interface/table/Td.d.ts +19 -19
- package/dist/src/editor/interface/table/Tr.d.ts +6 -6
- package/dist/src/editor/utils/clipboard.d.ts +9 -9
- package/dist/src/editor/utils/element.d.ts +11 -11
- package/dist/src/editor/utils/hotkey.d.ts +1 -0
- package/dist/src/editor/utils/index.d.ts +11 -8
- package/dist/src/editor/utils/print.d.ts +1 -1
- package/dist/src/editor/utils/ua.d.ts +1 -0
- package/package.json +64 -64
|
@@ -1,142 +1,143 @@
|
|
|
1
|
-
import { IDrawOption, IPainterOptions } from '../../interface/Draw';
|
|
2
|
-
import { IEditorOption, IEditorResult } from '../../interface/Editor';
|
|
3
|
-
import { IElement, IElementStyle } from '../../interface/Element';
|
|
4
|
-
import { Cursor } from '../cursor/Cursor';
|
|
5
|
-
import { CanvasEvent } from '../event/CanvasEvent';
|
|
6
|
-
import { HistoryManager } from '../history/HistoryManager';
|
|
7
|
-
import { Listener } from '../listener/Listener';
|
|
8
|
-
import { Position } from '../position/Position';
|
|
9
|
-
import { RangeManager } from '../range/RangeManager';
|
|
10
|
-
import { Search } from './interactive/Search';
|
|
11
|
-
import { ImageParticle } from './particle/ImageParticle';
|
|
12
|
-
import { TableTool } from './particle/table/TableTool';
|
|
13
|
-
import { HyperlinkParticle } from './particle/HyperlinkParticle';
|
|
14
|
-
import { EditorMode, PageMode } from '../../dataset/enum/Editor';
|
|
15
|
-
import { Control } from './control/Control';
|
|
16
|
-
import { DeepRequired } from '../../interface/Common';
|
|
17
|
-
import { WorkerManager } from '../worker/WorkerManager';
|
|
18
|
-
import { Previewer } from './particle/previewer/Previewer';
|
|
19
|
-
import { DateParticle } from './particle/date/DateParticle';
|
|
20
|
-
import { IMargin } from '../../interface/Margin';
|
|
21
|
-
import { I18n } from '../i18n/I18n';
|
|
22
|
-
export declare class Draw {
|
|
23
|
-
private container;
|
|
24
|
-
private pageContainer;
|
|
25
|
-
private pageList;
|
|
26
|
-
private ctxList;
|
|
27
|
-
private pageNo;
|
|
28
|
-
private mode;
|
|
29
|
-
private options;
|
|
30
|
-
private position;
|
|
31
|
-
private elementList;
|
|
32
|
-
private listener;
|
|
33
|
-
private i18n;
|
|
34
|
-
private canvasEvent;
|
|
35
|
-
private globalEvent;
|
|
36
|
-
private cursor;
|
|
37
|
-
private range;
|
|
38
|
-
private margin;
|
|
39
|
-
private background;
|
|
40
|
-
private search;
|
|
41
|
-
private underline;
|
|
42
|
-
private strikeout;
|
|
43
|
-
private highlight;
|
|
44
|
-
private historyManager;
|
|
45
|
-
private previewer;
|
|
46
|
-
private imageParticle;
|
|
47
|
-
private laTexParticle;
|
|
48
|
-
private textParticle;
|
|
49
|
-
private tableParticle;
|
|
50
|
-
private tableTool;
|
|
51
|
-
private pageNumber;
|
|
52
|
-
private waterMark;
|
|
53
|
-
private header;
|
|
54
|
-
private hyperlinkParticle;
|
|
55
|
-
private dateParticle;
|
|
56
|
-
private separatorParticle;
|
|
57
|
-
private pageBreakParticle;
|
|
58
|
-
private superscriptParticle;
|
|
59
|
-
private subscriptParticle;
|
|
60
|
-
private checkboxParticle;
|
|
61
|
-
private blockParticle;
|
|
62
|
-
private control;
|
|
63
|
-
private workerManager;
|
|
64
|
-
private scrollObserver;
|
|
65
|
-
private selectionObserver;
|
|
66
|
-
private rowList;
|
|
67
|
-
private painterStyle;
|
|
68
|
-
private painterOptions;
|
|
69
|
-
private visiblePageNoList;
|
|
70
|
-
private intersectionPageNo;
|
|
71
|
-
constructor(rootContainer: HTMLElement, options: DeepRequired<IEditorOption>, elementList: IElement[], listener: Listener);
|
|
72
|
-
getMode(): EditorMode;
|
|
73
|
-
setMode(payload: EditorMode): void;
|
|
74
|
-
isReadonly(): boolean;
|
|
75
|
-
getWidth(): number;
|
|
76
|
-
getHeight(): number;
|
|
77
|
-
getCanvasWidth(): number;
|
|
78
|
-
getCanvasHeight(): number;
|
|
79
|
-
getInnerWidth(): number;
|
|
80
|
-
getOriginalInnerWidth(): number;
|
|
81
|
-
getMargins(): IMargin;
|
|
82
|
-
getOriginalMargins(): number[];
|
|
83
|
-
getPageGap(): number;
|
|
84
|
-
getPageNumberBottom(): number;
|
|
85
|
-
getHeaderTop(): number;
|
|
86
|
-
getMarginIndicatorSize(): number;
|
|
87
|
-
getDefaultBasicRowMarginHeight(): number;
|
|
88
|
-
getTdPadding(): number;
|
|
89
|
-
getContainer(): HTMLDivElement;
|
|
90
|
-
getPageContainer(): HTMLDivElement;
|
|
91
|
-
getVisiblePageNoList(): number[];
|
|
92
|
-
setVisiblePageNoList(payload: number[]): void;
|
|
93
|
-
getIntersectionPageNo(): number;
|
|
94
|
-
setIntersectionPageNo(payload: number): void;
|
|
95
|
-
getPageNo(): number;
|
|
96
|
-
setPageNo(payload: number): void;
|
|
97
|
-
getPage(): HTMLCanvasElement;
|
|
98
|
-
getPageList(): HTMLCanvasElement[];
|
|
99
|
-
getCtx(): CanvasRenderingContext2D;
|
|
100
|
-
getOptions(): DeepRequired<IEditorOption>;
|
|
101
|
-
getSearch(): Search;
|
|
102
|
-
getHistoryManager(): HistoryManager;
|
|
103
|
-
getPosition(): Position;
|
|
104
|
-
getRange(): RangeManager;
|
|
105
|
-
getElementList(): IElement[];
|
|
106
|
-
insertElementList(payload: IElement[]): void;
|
|
107
|
-
getOriginalElementList(): IElement[];
|
|
108
|
-
getCanvasEvent(): CanvasEvent;
|
|
109
|
-
getListener(): Listener;
|
|
110
|
-
getCursor(): Cursor;
|
|
111
|
-
getPreviewer(): Previewer;
|
|
112
|
-
getImageParticle(): ImageParticle;
|
|
113
|
-
getTableTool(): TableTool;
|
|
114
|
-
getHyperlinkParticle(): HyperlinkParticle;
|
|
115
|
-
getDateParticle(): DateParticle;
|
|
116
|
-
getControl(): Control;
|
|
117
|
-
getWorkerManager(): WorkerManager;
|
|
118
|
-
getI18n(): I18n;
|
|
119
|
-
getRowCount(): number;
|
|
120
|
-
getDataURL(): string[];
|
|
121
|
-
getPainterStyle(): IElementStyle | null;
|
|
122
|
-
getPainterOptions(): IPainterOptions | null;
|
|
123
|
-
setPainterStyle(payload: IElementStyle | null, options?: IPainterOptions): void;
|
|
124
|
-
setDefaultRange(): void;
|
|
125
|
-
setPageMode(payload: PageMode): void;
|
|
126
|
-
setPageScale(payload: number): void;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
private
|
|
132
|
-
private
|
|
133
|
-
private
|
|
134
|
-
private
|
|
135
|
-
private
|
|
136
|
-
private
|
|
137
|
-
private
|
|
138
|
-
private
|
|
139
|
-
private
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
1
|
+
import { IDrawOption, IPainterOptions } from '../../interface/Draw';
|
|
2
|
+
import { IEditorOption, IEditorResult } from '../../interface/Editor';
|
|
3
|
+
import { IElement, IElementStyle } from '../../interface/Element';
|
|
4
|
+
import { Cursor } from '../cursor/Cursor';
|
|
5
|
+
import { CanvasEvent } from '../event/CanvasEvent';
|
|
6
|
+
import { HistoryManager } from '../history/HistoryManager';
|
|
7
|
+
import { Listener } from '../listener/Listener';
|
|
8
|
+
import { Position } from '../position/Position';
|
|
9
|
+
import { RangeManager } from '../range/RangeManager';
|
|
10
|
+
import { Search } from './interactive/Search';
|
|
11
|
+
import { ImageParticle } from './particle/ImageParticle';
|
|
12
|
+
import { TableTool } from './particle/table/TableTool';
|
|
13
|
+
import { HyperlinkParticle } from './particle/HyperlinkParticle';
|
|
14
|
+
import { EditorMode, PageMode } from '../../dataset/enum/Editor';
|
|
15
|
+
import { Control } from './control/Control';
|
|
16
|
+
import { DeepRequired } from '../../interface/Common';
|
|
17
|
+
import { WorkerManager } from '../worker/WorkerManager';
|
|
18
|
+
import { Previewer } from './particle/previewer/Previewer';
|
|
19
|
+
import { DateParticle } from './particle/date/DateParticle';
|
|
20
|
+
import { IMargin } from '../../interface/Margin';
|
|
21
|
+
import { I18n } from '../i18n/I18n';
|
|
22
|
+
export declare class Draw {
|
|
23
|
+
private container;
|
|
24
|
+
private pageContainer;
|
|
25
|
+
private pageList;
|
|
26
|
+
private ctxList;
|
|
27
|
+
private pageNo;
|
|
28
|
+
private mode;
|
|
29
|
+
private options;
|
|
30
|
+
private position;
|
|
31
|
+
private elementList;
|
|
32
|
+
private listener;
|
|
33
|
+
private i18n;
|
|
34
|
+
private canvasEvent;
|
|
35
|
+
private globalEvent;
|
|
36
|
+
private cursor;
|
|
37
|
+
private range;
|
|
38
|
+
private margin;
|
|
39
|
+
private background;
|
|
40
|
+
private search;
|
|
41
|
+
private underline;
|
|
42
|
+
private strikeout;
|
|
43
|
+
private highlight;
|
|
44
|
+
private historyManager;
|
|
45
|
+
private previewer;
|
|
46
|
+
private imageParticle;
|
|
47
|
+
private laTexParticle;
|
|
48
|
+
private textParticle;
|
|
49
|
+
private tableParticle;
|
|
50
|
+
private tableTool;
|
|
51
|
+
private pageNumber;
|
|
52
|
+
private waterMark;
|
|
53
|
+
private header;
|
|
54
|
+
private hyperlinkParticle;
|
|
55
|
+
private dateParticle;
|
|
56
|
+
private separatorParticle;
|
|
57
|
+
private pageBreakParticle;
|
|
58
|
+
private superscriptParticle;
|
|
59
|
+
private subscriptParticle;
|
|
60
|
+
private checkboxParticle;
|
|
61
|
+
private blockParticle;
|
|
62
|
+
private control;
|
|
63
|
+
private workerManager;
|
|
64
|
+
private scrollObserver;
|
|
65
|
+
private selectionObserver;
|
|
66
|
+
private rowList;
|
|
67
|
+
private painterStyle;
|
|
68
|
+
private painterOptions;
|
|
69
|
+
private visiblePageNoList;
|
|
70
|
+
private intersectionPageNo;
|
|
71
|
+
constructor(rootContainer: HTMLElement, options: DeepRequired<IEditorOption>, elementList: IElement[], listener: Listener);
|
|
72
|
+
getMode(): EditorMode;
|
|
73
|
+
setMode(payload: EditorMode): void;
|
|
74
|
+
isReadonly(): boolean;
|
|
75
|
+
getWidth(): number;
|
|
76
|
+
getHeight(): number;
|
|
77
|
+
getCanvasWidth(): number;
|
|
78
|
+
getCanvasHeight(): number;
|
|
79
|
+
getInnerWidth(): number;
|
|
80
|
+
getOriginalInnerWidth(): number;
|
|
81
|
+
getMargins(): IMargin;
|
|
82
|
+
getOriginalMargins(): number[];
|
|
83
|
+
getPageGap(): number;
|
|
84
|
+
getPageNumberBottom(): number;
|
|
85
|
+
getHeaderTop(): number;
|
|
86
|
+
getMarginIndicatorSize(): number;
|
|
87
|
+
getDefaultBasicRowMarginHeight(): number;
|
|
88
|
+
getTdPadding(): number;
|
|
89
|
+
getContainer(): HTMLDivElement;
|
|
90
|
+
getPageContainer(): HTMLDivElement;
|
|
91
|
+
getVisiblePageNoList(): number[];
|
|
92
|
+
setVisiblePageNoList(payload: number[]): void;
|
|
93
|
+
getIntersectionPageNo(): number;
|
|
94
|
+
setIntersectionPageNo(payload: number): void;
|
|
95
|
+
getPageNo(): number;
|
|
96
|
+
setPageNo(payload: number): void;
|
|
97
|
+
getPage(): HTMLCanvasElement;
|
|
98
|
+
getPageList(): HTMLCanvasElement[];
|
|
99
|
+
getCtx(): CanvasRenderingContext2D;
|
|
100
|
+
getOptions(): DeepRequired<IEditorOption>;
|
|
101
|
+
getSearch(): Search;
|
|
102
|
+
getHistoryManager(): HistoryManager;
|
|
103
|
+
getPosition(): Position;
|
|
104
|
+
getRange(): RangeManager;
|
|
105
|
+
getElementList(): IElement[];
|
|
106
|
+
insertElementList(payload: IElement[]): void;
|
|
107
|
+
getOriginalElementList(): IElement[];
|
|
108
|
+
getCanvasEvent(): CanvasEvent;
|
|
109
|
+
getListener(): Listener;
|
|
110
|
+
getCursor(): Cursor;
|
|
111
|
+
getPreviewer(): Previewer;
|
|
112
|
+
getImageParticle(): ImageParticle;
|
|
113
|
+
getTableTool(): TableTool;
|
|
114
|
+
getHyperlinkParticle(): HyperlinkParticle;
|
|
115
|
+
getDateParticle(): DateParticle;
|
|
116
|
+
getControl(): Control;
|
|
117
|
+
getWorkerManager(): WorkerManager;
|
|
118
|
+
getI18n(): I18n;
|
|
119
|
+
getRowCount(): number;
|
|
120
|
+
getDataURL(): string[];
|
|
121
|
+
getPainterStyle(): IElementStyle | null;
|
|
122
|
+
getPainterOptions(): IPainterOptions | null;
|
|
123
|
+
setPainterStyle(payload: IElementStyle | null, options?: IPainterOptions): void;
|
|
124
|
+
setDefaultRange(): void;
|
|
125
|
+
setPageMode(payload: PageMode): void;
|
|
126
|
+
setPageScale(payload: number): void;
|
|
127
|
+
setPageDevicePixel(): void;
|
|
128
|
+
setPaperSize(width: number, height: number): void;
|
|
129
|
+
setPaperMargin(payload: IMargin): void;
|
|
130
|
+
getValue(): IEditorResult;
|
|
131
|
+
private _wrapContainer;
|
|
132
|
+
private _formatContainer;
|
|
133
|
+
private _createPageContainer;
|
|
134
|
+
private _createPage;
|
|
135
|
+
private _getFont;
|
|
136
|
+
private _computeRowList;
|
|
137
|
+
private _drawRichText;
|
|
138
|
+
private _drawRow;
|
|
139
|
+
private _clearPage;
|
|
140
|
+
private _drawPage;
|
|
141
|
+
render(payload?: IDrawOption): void;
|
|
142
|
+
destroy(): void;
|
|
143
|
+
}
|
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
import { IControlInitOption, IControlInstance } from '../../../interface/Control';
|
|
2
|
-
import { IElement, IElementPosition } from '../../../interface/Element';
|
|
3
|
-
import { IRange } from '../../../interface/Range';
|
|
4
|
-
import { Draw } from '../Draw';
|
|
5
|
-
interface IMoveCursorResult {
|
|
6
|
-
newIndex: number;
|
|
7
|
-
newElement: IElement;
|
|
8
|
-
}
|
|
9
|
-
export declare class Control {
|
|
10
|
-
private draw;
|
|
11
|
-
private range;
|
|
12
|
-
private listener;
|
|
13
|
-
private options;
|
|
14
|
-
private activeControl;
|
|
15
|
-
constructor(draw: Draw);
|
|
16
|
-
isPartRangeInControlOutside(): boolean;
|
|
17
|
-
getContainer(): HTMLDivElement;
|
|
18
|
-
getElementList(): IElement[];
|
|
19
|
-
getPosition(): IElementPosition | null;
|
|
20
|
-
getPreY(): number;
|
|
21
|
-
getRange(): IRange;
|
|
22
|
-
shrinkBoundary(): void;
|
|
23
|
-
getActiveControl(): IControlInstance | null;
|
|
24
|
-
initControl(): void;
|
|
25
|
-
destroyControl(): void;
|
|
26
|
-
repaintControl(curIndex: number): void;
|
|
27
|
-
moveCursor(position: IControlInitOption): IMoveCursorResult;
|
|
28
|
-
removeControl(startIndex: number): number;
|
|
29
|
-
removePlaceholder(startIndex: number): void;
|
|
30
|
-
addPlaceholder(startIndex: number): void;
|
|
31
|
-
setValue(data: IElement[]): number;
|
|
32
|
-
keydown(evt: KeyboardEvent): number;
|
|
33
|
-
cut(): number;
|
|
34
|
-
}
|
|
35
|
-
export {};
|
|
1
|
+
import { IControlInitOption, IControlInstance } from '../../../interface/Control';
|
|
2
|
+
import { IElement, IElementPosition } from '../../../interface/Element';
|
|
3
|
+
import { IRange } from '../../../interface/Range';
|
|
4
|
+
import { Draw } from '../Draw';
|
|
5
|
+
interface IMoveCursorResult {
|
|
6
|
+
newIndex: number;
|
|
7
|
+
newElement: IElement;
|
|
8
|
+
}
|
|
9
|
+
export declare class Control {
|
|
10
|
+
private draw;
|
|
11
|
+
private range;
|
|
12
|
+
private listener;
|
|
13
|
+
private options;
|
|
14
|
+
private activeControl;
|
|
15
|
+
constructor(draw: Draw);
|
|
16
|
+
isPartRangeInControlOutside(): boolean;
|
|
17
|
+
getContainer(): HTMLDivElement;
|
|
18
|
+
getElementList(): IElement[];
|
|
19
|
+
getPosition(): IElementPosition | null;
|
|
20
|
+
getPreY(): number;
|
|
21
|
+
getRange(): IRange;
|
|
22
|
+
shrinkBoundary(): void;
|
|
23
|
+
getActiveControl(): IControlInstance | null;
|
|
24
|
+
initControl(): void;
|
|
25
|
+
destroyControl(): void;
|
|
26
|
+
repaintControl(curIndex: number): void;
|
|
27
|
+
moveCursor(position: IControlInitOption): IMoveCursorResult;
|
|
28
|
+
removeControl(startIndex: number): number;
|
|
29
|
+
removePlaceholder(startIndex: number): void;
|
|
30
|
+
addPlaceholder(startIndex: number): void;
|
|
31
|
+
setValue(data: IElement[]): number;
|
|
32
|
+
keydown(evt: KeyboardEvent): number;
|
|
33
|
+
cut(): number;
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { IControlInstance } from '../../../../interface/Control';
|
|
2
|
-
import { IElement } from '../../../../interface/Element';
|
|
3
|
-
import { Control } from '../Control';
|
|
4
|
-
export declare class CheckboxControl implements IControlInstance {
|
|
5
|
-
private element;
|
|
6
|
-
private control;
|
|
7
|
-
constructor(element: IElement, control: Control);
|
|
8
|
-
getElement(): IElement;
|
|
9
|
-
getCode(): string | null;
|
|
10
|
-
getValue(): IElement[];
|
|
11
|
-
setValue(): number;
|
|
12
|
-
setSelect(): void;
|
|
13
|
-
keydown(evt: KeyboardEvent): number;
|
|
14
|
-
cut(): number;
|
|
15
|
-
}
|
|
1
|
+
import { IControlInstance } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { Control } from '../Control';
|
|
4
|
+
export declare class CheckboxControl implements IControlInstance {
|
|
5
|
+
private element;
|
|
6
|
+
private control;
|
|
7
|
+
constructor(element: IElement, control: Control);
|
|
8
|
+
getElement(): IElement;
|
|
9
|
+
getCode(): string | null;
|
|
10
|
+
getValue(): IElement[];
|
|
11
|
+
setValue(): number;
|
|
12
|
+
setSelect(): void;
|
|
13
|
+
keydown(evt: KeyboardEvent): number;
|
|
14
|
+
cut(): number;
|
|
15
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { IControlInstance } from '../../../../interface/Control';
|
|
2
|
-
import { IElement } from '../../../../interface/Element';
|
|
3
|
-
import { Control } from '../Control';
|
|
4
|
-
export declare class SelectControl implements IControlInstance {
|
|
5
|
-
private element;
|
|
6
|
-
private control;
|
|
7
|
-
private isPopup;
|
|
8
|
-
private selectDom;
|
|
9
|
-
constructor(element: IElement, control: Control);
|
|
10
|
-
getElement(): IElement;
|
|
11
|
-
getCode(): string | null;
|
|
12
|
-
getValue(): IElement[];
|
|
13
|
-
setValue(): number;
|
|
14
|
-
keydown(evt: KeyboardEvent): number;
|
|
15
|
-
cut(): number;
|
|
16
|
-
clearSelect(): number;
|
|
17
|
-
setSelect(code: string): void;
|
|
18
|
-
private _createSelectPopupDom;
|
|
19
|
-
awake(): void;
|
|
20
|
-
destroy(): void;
|
|
21
|
-
}
|
|
1
|
+
import { IControlInstance } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { Control } from '../Control';
|
|
4
|
+
export declare class SelectControl implements IControlInstance {
|
|
5
|
+
private element;
|
|
6
|
+
private control;
|
|
7
|
+
private isPopup;
|
|
8
|
+
private selectDom;
|
|
9
|
+
constructor(element: IElement, control: Control);
|
|
10
|
+
getElement(): IElement;
|
|
11
|
+
getCode(): string | null;
|
|
12
|
+
getValue(): IElement[];
|
|
13
|
+
setValue(): number;
|
|
14
|
+
keydown(evt: KeyboardEvent): number;
|
|
15
|
+
cut(): number;
|
|
16
|
+
clearSelect(): number;
|
|
17
|
+
setSelect(code: string): void;
|
|
18
|
+
private _createSelectPopupDom;
|
|
19
|
+
awake(): void;
|
|
20
|
+
destroy(): void;
|
|
21
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { IControlInstance } from '../../../../interface/Control';
|
|
2
|
-
import { IElement } from '../../../../interface/Element';
|
|
3
|
-
import { Control } from '../Control';
|
|
4
|
-
export declare class TextControl implements IControlInstance {
|
|
5
|
-
private element;
|
|
6
|
-
private control;
|
|
7
|
-
constructor(element: IElement, control: Control);
|
|
8
|
-
getElement(): IElement;
|
|
9
|
-
getValue(): IElement[];
|
|
10
|
-
setValue(data: IElement[]): number;
|
|
11
|
-
keydown(evt: KeyboardEvent): number;
|
|
12
|
-
cut(): number;
|
|
13
|
-
}
|
|
1
|
+
import { IControlInstance } from '../../../../interface/Control';
|
|
2
|
+
import { IElement } from '../../../../interface/Element';
|
|
3
|
+
import { Control } from '../Control';
|
|
4
|
+
export declare class TextControl implements IControlInstance {
|
|
5
|
+
private element;
|
|
6
|
+
private control;
|
|
7
|
+
constructor(element: IElement, control: Control);
|
|
8
|
+
getElement(): IElement;
|
|
9
|
+
getValue(): IElement[];
|
|
10
|
+
setValue(data: IElement[]): number;
|
|
11
|
+
keydown(evt: KeyboardEvent): number;
|
|
12
|
+
cut(): number;
|
|
13
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Draw } from '../Draw';
|
|
2
|
-
export declare class Background {
|
|
3
|
-
private options;
|
|
4
|
-
constructor(draw: Draw);
|
|
5
|
-
render(ctx: CanvasRenderingContext2D): void;
|
|
6
|
-
}
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class Background {
|
|
3
|
+
private options;
|
|
4
|
+
constructor(draw: Draw);
|
|
5
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
6
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Draw } from '../Draw';
|
|
2
|
-
export declare class Header {
|
|
3
|
-
private draw;
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
-
}
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class Header {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Draw } from '../Draw';
|
|
2
|
-
export declare class Margin {
|
|
3
|
-
private draw;
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
-
}
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class Margin {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Draw } from '../Draw';
|
|
2
|
-
export declare class PageNumber {
|
|
3
|
-
private draw;
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
7
|
-
}
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class PageNumber {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D, pageNo: number): void;
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Draw } from '../Draw';
|
|
2
|
-
export declare class Watermark {
|
|
3
|
-
private draw;
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
-
}
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class Watermark {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D): void;
|
|
7
|
+
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { IElementPosition } from '../../../interface/Element';
|
|
2
|
-
import { ISearchResult } from '../../../interface/Search';
|
|
3
|
-
import { Draw } from '../Draw';
|
|
4
|
-
export interface INavigateInfo {
|
|
5
|
-
index: number;
|
|
6
|
-
count: number;
|
|
7
|
-
}
|
|
8
|
-
export declare class Search {
|
|
9
|
-
private draw;
|
|
10
|
-
private options;
|
|
11
|
-
private position;
|
|
12
|
-
private searchKeyword;
|
|
13
|
-
private searchNavigateIndex;
|
|
14
|
-
private searchMatchList;
|
|
15
|
-
constructor(draw: Draw);
|
|
16
|
-
getSearchKeyword(): string | null;
|
|
17
|
-
setSearchKeyword(payload: string | null): void;
|
|
18
|
-
searchNavigatePre(): number | null;
|
|
19
|
-
searchNavigateNext(): number | null;
|
|
20
|
-
searchNavigateScrollIntoView(position: IElementPosition): void;
|
|
21
|
-
getSearchNavigateIndexList(): any[];
|
|
22
|
-
getSearchMatchList(): ISearchResult[];
|
|
23
|
-
getSearchNavigateInfo(): null | INavigateInfo;
|
|
24
|
-
compute(payload: string): void;
|
|
25
|
-
render(ctx: CanvasRenderingContext2D, pageIndex: number): void;
|
|
26
|
-
}
|
|
1
|
+
import { IElementPosition } from '../../../interface/Element';
|
|
2
|
+
import { ISearchResult } from '../../../interface/Search';
|
|
3
|
+
import { Draw } from '../Draw';
|
|
4
|
+
export interface INavigateInfo {
|
|
5
|
+
index: number;
|
|
6
|
+
count: number;
|
|
7
|
+
}
|
|
8
|
+
export declare class Search {
|
|
9
|
+
private draw;
|
|
10
|
+
private options;
|
|
11
|
+
private position;
|
|
12
|
+
private searchKeyword;
|
|
13
|
+
private searchNavigateIndex;
|
|
14
|
+
private searchMatchList;
|
|
15
|
+
constructor(draw: Draw);
|
|
16
|
+
getSearchKeyword(): string | null;
|
|
17
|
+
setSearchKeyword(payload: string | null): void;
|
|
18
|
+
searchNavigatePre(): number | null;
|
|
19
|
+
searchNavigateNext(): number | null;
|
|
20
|
+
searchNavigateScrollIntoView(position: IElementPosition): void;
|
|
21
|
+
getSearchNavigateIndexList(): any[];
|
|
22
|
+
getSearchMatchList(): ISearchResult[];
|
|
23
|
+
getSearchNavigateInfo(): null | INavigateInfo;
|
|
24
|
+
compute(payload: string): void;
|
|
25
|
+
render(ctx: CanvasRenderingContext2D, pageIndex: number): void;
|
|
26
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { IRowElement } from '../../../interface/Row';
|
|
2
|
-
import { Draw } from '../Draw';
|
|
3
|
-
export declare class CheckboxParticle {
|
|
4
|
-
private options;
|
|
5
|
-
constructor(draw: Draw);
|
|
6
|
-
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
7
|
-
}
|
|
1
|
+
import { IRowElement } from '../../../interface/Row';
|
|
2
|
+
import { Draw } from '../Draw';
|
|
3
|
+
export declare class CheckboxParticle {
|
|
4
|
+
private options;
|
|
5
|
+
constructor(draw: Draw);
|
|
6
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
7
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { IElement } from '../../..';
|
|
2
|
-
import { IElementPosition } from '../../../interface/Element';
|
|
3
|
-
import { IRowElement } from '../../../interface/Row';
|
|
4
|
-
import { Draw } from '../Draw';
|
|
5
|
-
export declare class HyperlinkParticle {
|
|
6
|
-
private draw;
|
|
7
|
-
private options;
|
|
8
|
-
private container;
|
|
9
|
-
private hyperlinkPopupContainer;
|
|
10
|
-
private hyperlinkDom;
|
|
11
|
-
constructor(draw: Draw);
|
|
12
|
-
private _createHyperlinkPopupDom;
|
|
13
|
-
drawHyperlinkPopup(element: IElement, position: IElementPosition): void;
|
|
14
|
-
clearHyperlinkPopup(): void;
|
|
15
|
-
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
16
|
-
}
|
|
1
|
+
import { IElement } from '../../..';
|
|
2
|
+
import { IElementPosition } from '../../../interface/Element';
|
|
3
|
+
import { IRowElement } from '../../../interface/Row';
|
|
4
|
+
import { Draw } from '../Draw';
|
|
5
|
+
export declare class HyperlinkParticle {
|
|
6
|
+
private draw;
|
|
7
|
+
private options;
|
|
8
|
+
private container;
|
|
9
|
+
private hyperlinkPopupContainer;
|
|
10
|
+
private hyperlinkDom;
|
|
11
|
+
constructor(draw: Draw);
|
|
12
|
+
private _createHyperlinkPopupDom;
|
|
13
|
+
drawHyperlinkPopup(element: IElement, position: IElementPosition): void;
|
|
14
|
+
clearHyperlinkPopup(): void;
|
|
15
|
+
render(ctx: CanvasRenderingContext2D, element: IRowElement, x: number, y: number): void;
|
|
16
|
+
}
|