@hufe921/canvas-editor 0.9.15 → 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/dist/canvas-editor.es.js +100 -29
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +10 -10
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/cursor/Cursor.d.ts +2 -0
- package/dist/src/editor/core/draw/Draw.d.ts +1 -0
- package/dist/src/editor/core/event/CanvasEvent.d.ts +9 -2
- package/dist/src/editor/core/event/GlobalEvent.d.ts +2 -0
- package/dist/src/editor/core/event/handlers/composition.d.ts +1 -1
- package/dist/src/editor/core/event/handlers/input.d.ts +1 -0
- package/package.json +1 -1
|
@@ -10,6 +10,8 @@ export declare class Cursor {
|
|
|
10
10
|
constructor(draw: Draw, canvasEvent: CanvasEvent);
|
|
11
11
|
getCursorDom(): HTMLDivElement;
|
|
12
12
|
getAgentDom(): HTMLTextAreaElement;
|
|
13
|
+
getAgentDomValue(): string;
|
|
14
|
+
clearAgentDomValue(): string;
|
|
13
15
|
drawCursor(): void;
|
|
14
16
|
recoveryCursor(): void;
|
|
15
17
|
}
|
|
@@ -124,6 +124,7 @@ export declare class Draw {
|
|
|
124
124
|
setDefaultRange(): void;
|
|
125
125
|
setPageMode(payload: PageMode): void;
|
|
126
126
|
setPageScale(payload: number): void;
|
|
127
|
+
setPageDevicePixel(): void;
|
|
127
128
|
setPaperSize(width: number, height: number): void;
|
|
128
129
|
setPaperMargin(payload: IMargin): void;
|
|
129
130
|
getValue(): IEditorResult;
|
|
@@ -2,9 +2,16 @@ import { IElement, IElementPosition } from '../../interface/Element';
|
|
|
2
2
|
import { ICurrentPosition } from '../../interface/Position';
|
|
3
3
|
import { Draw } from '../draw/Draw';
|
|
4
4
|
import { IRange } from '../../interface/Range';
|
|
5
|
+
export interface ICompositionInfo {
|
|
6
|
+
elementList: IElement[];
|
|
7
|
+
startIndex: number;
|
|
8
|
+
endIndex: number;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
5
11
|
export declare class CanvasEvent {
|
|
6
12
|
isAllowSelection: boolean;
|
|
7
|
-
|
|
13
|
+
isComposing: boolean;
|
|
14
|
+
compositionInfo: ICompositionInfo | null;
|
|
8
15
|
isAllowDrag: boolean;
|
|
9
16
|
isAllowDrop: boolean;
|
|
10
17
|
cacheRange: IRange | null;
|
|
@@ -35,7 +42,7 @@ export declare class CanvasEvent {
|
|
|
35
42
|
cut(): void;
|
|
36
43
|
copy(): void;
|
|
37
44
|
compositionstart(): void;
|
|
38
|
-
compositionend(): void;
|
|
45
|
+
compositionend(evt: CompositionEvent): void;
|
|
39
46
|
drop(evt: DragEvent): void;
|
|
40
47
|
dragover(evt: DragEvent | MouseEvent): void;
|
|
41
48
|
}
|
|
@@ -12,6 +12,7 @@ export declare class GlobalEvent {
|
|
|
12
12
|
private hyperlinkParticle;
|
|
13
13
|
private control;
|
|
14
14
|
private dateParticle;
|
|
15
|
+
private dprMediaQueryList;
|
|
15
16
|
constructor(draw: Draw, canvasEvent: CanvasEvent);
|
|
16
17
|
register(): void;
|
|
17
18
|
private addEvent;
|
|
@@ -21,4 +22,5 @@ export declare class GlobalEvent {
|
|
|
21
22
|
setRangeStyle: () => void;
|
|
22
23
|
setPageScale: (evt: WheelEvent) => void;
|
|
23
24
|
private _handleVisibilityChange;
|
|
25
|
+
private _handleDprChange;
|
|
24
26
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CanvasEvent } from '../CanvasEvent';
|
|
2
2
|
declare function compositionstart(host: CanvasEvent): void;
|
|
3
|
-
declare function compositionend(host: CanvasEvent): void;
|
|
3
|
+
declare function compositionend(host: CanvasEvent, evt: CompositionEvent): void;
|
|
4
4
|
declare const _default: {
|
|
5
5
|
compositionstart: typeof compositionstart;
|
|
6
6
|
compositionend: typeof compositionend;
|