@hufe921/canvas-editor 0.9.16 → 0.9.17
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/README.md +7 -8
- package/dist/canvas-editor.es.js +68 -48
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +18 -18
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/cursor/Cursor.d.ts +5 -1
- package/dist/src/editor/core/observer/ScrollObserver.d.ts +9 -3
- package/dist/src/editor/dataset/constant/Cursor.d.ts +2 -0
- package/dist/src/editor/interface/Cursor.d.ts +6 -0
- package/dist/src/editor/interface/Editor.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { ICursorOption } from '../../interface/Cursor';
|
|
1
2
|
import { Draw } from '../draw/Draw';
|
|
2
3
|
import { CanvasEvent } from '../event/CanvasEvent';
|
|
4
|
+
export declare type IDrawCursorOption = ICursorOption & {
|
|
5
|
+
isBlink?: boolean;
|
|
6
|
+
};
|
|
3
7
|
export declare class Cursor {
|
|
4
8
|
private draw;
|
|
5
9
|
private container;
|
|
@@ -12,6 +16,6 @@ export declare class Cursor {
|
|
|
12
16
|
getAgentDom(): HTMLTextAreaElement;
|
|
13
17
|
getAgentDomValue(): string;
|
|
14
18
|
clearAgentDomValue(): string;
|
|
15
|
-
drawCursor(): void;
|
|
19
|
+
drawCursor(payload?: IDrawCursorOption): void;
|
|
16
20
|
recoveryCursor(): void;
|
|
17
21
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Draw } from '../draw/Draw';
|
|
2
|
+
export interface IElementVisibleInfo {
|
|
3
|
+
intersectionHeight: number;
|
|
4
|
+
}
|
|
5
|
+
export interface IPageVisibleInfo {
|
|
6
|
+
intersectionPageNo: number;
|
|
7
|
+
visiblePageNoList: number[];
|
|
8
|
+
}
|
|
2
9
|
export declare class ScrollObserver {
|
|
3
10
|
private draw;
|
|
4
|
-
private options;
|
|
5
|
-
private pageContainer;
|
|
6
|
-
private pageHeight;
|
|
7
11
|
constructor(draw: Draw);
|
|
8
12
|
private _addEvent;
|
|
9
13
|
removeEvent(): void;
|
|
14
|
+
getElementVisibleInfo(element: Element): IElementVisibleInfo;
|
|
15
|
+
getPageVisibleInfo(): IPageVisibleInfo;
|
|
10
16
|
private _observer;
|
|
11
17
|
}
|
|
@@ -2,6 +2,7 @@ import { IElement } from '..';
|
|
|
2
2
|
import { EditorMode, PageMode } from '../dataset/enum/Editor';
|
|
3
3
|
import { ICheckboxOption } from './Checkbox';
|
|
4
4
|
import { IControlOption } from './Control';
|
|
5
|
+
import { ICursorOption } from './Cursor';
|
|
5
6
|
import { IHeader } from './Header';
|
|
6
7
|
import { IMargin } from './Margin';
|
|
7
8
|
import { IWatermark } from './Watermark';
|
|
@@ -43,6 +44,7 @@ export interface IEditorOption {
|
|
|
43
44
|
watermark?: IWatermark;
|
|
44
45
|
control?: IControlOption;
|
|
45
46
|
checkbox?: ICheckboxOption;
|
|
47
|
+
cursor?: ICursorOption;
|
|
46
48
|
}
|
|
47
49
|
export interface IEditorResult {
|
|
48
50
|
version: string;
|