@hufe921/canvas-editor 0.9.131 → 0.9.132
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/CHANGELOG.md +25 -0
- package/dist/canvas-editor.es.js +184 -30
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +21 -21
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/draw/Draw.d.ts +3 -0
- package/dist/src/editor/core/draw/interactive/Magnifier.d.ts +19 -0
- package/dist/src/editor/core/event/GlobalEvent.d.ts +1 -0
- package/dist/src/editor/core/observer/SelectionObserver.d.ts +1 -0
- package/dist/src/editor/dataset/constant/Magnifier.d.ts +2 -0
- package/dist/src/editor/dataset/enum/KeyMap.d.ts +1 -0
- package/dist/src/editor/interface/Editor.d.ts +2 -0
- package/dist/src/editor/interface/Magnifier.d.ts +6 -0
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ import { TableOperate } from './particle/table/TableOperate';
|
|
|
41
41
|
import { Area } from './interactive/Area';
|
|
42
42
|
import { Badge } from './frame/Badge';
|
|
43
43
|
import { Graffiti } from './graffiti/Graffiti';
|
|
44
|
+
import { Magnifier } from './interactive/Magnifier';
|
|
44
45
|
export declare class Draw {
|
|
45
46
|
private container;
|
|
46
47
|
private pageContainer;
|
|
@@ -65,6 +66,7 @@ export declare class Draw {
|
|
|
65
66
|
private margin;
|
|
66
67
|
private background;
|
|
67
68
|
private badge;
|
|
69
|
+
private magnifier;
|
|
68
70
|
private search;
|
|
69
71
|
private group;
|
|
70
72
|
private area;
|
|
@@ -168,6 +170,7 @@ export declare class Draw {
|
|
|
168
170
|
getGroup(): Group;
|
|
169
171
|
getArea(): Area;
|
|
170
172
|
getBadge(): Badge;
|
|
173
|
+
getMagnifier(): Magnifier;
|
|
171
174
|
getHistoryManager(): HistoryManager;
|
|
172
175
|
getPosition(): Position;
|
|
173
176
|
getZone(): Zone;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Draw } from '../Draw';
|
|
2
|
+
export declare class Magnifier {
|
|
3
|
+
private draw;
|
|
4
|
+
private options;
|
|
5
|
+
private canvas;
|
|
6
|
+
private isActive;
|
|
7
|
+
private container;
|
|
8
|
+
constructor(draw: Draw);
|
|
9
|
+
private _createMagnifierCanvas;
|
|
10
|
+
private _addEvent;
|
|
11
|
+
private _removeEvent;
|
|
12
|
+
private _handleKeyDown;
|
|
13
|
+
private _handleKeyUp;
|
|
14
|
+
private _mousemove;
|
|
15
|
+
show(): void;
|
|
16
|
+
hide(): void;
|
|
17
|
+
private _update;
|
|
18
|
+
destroy(): void;
|
|
19
|
+
}
|
|
@@ -27,6 +27,7 @@ import { LocationPosition } from '../dataset/enum/Common';
|
|
|
27
27
|
import { IRange } from './Range';
|
|
28
28
|
import { IGraffitiData, IGraffitiOption } from './Graffiti';
|
|
29
29
|
import { IWhiteSpaceOption } from './WhiteSpace';
|
|
30
|
+
import { IMagnifierOption } from './Magnifier';
|
|
30
31
|
export interface IEditorData {
|
|
31
32
|
header?: IElement[];
|
|
32
33
|
main: IElement[];
|
|
@@ -104,6 +105,7 @@ export interface IEditorOption {
|
|
|
104
105
|
label?: ILabelOption;
|
|
105
106
|
imgCaption?: IImgCaptionOption;
|
|
106
107
|
list?: IListOption;
|
|
108
|
+
magnifier?: IMagnifierOption;
|
|
107
109
|
}
|
|
108
110
|
export interface IEditorResult {
|
|
109
111
|
version: string;
|
package/package.json
CHANGED