@hufe921/canvas-editor 0.9.21 → 0.9.22
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 +24 -0
- package/dist/canvas-editor.es.js +70 -26
- package/dist/canvas-editor.es.js.map +1 -1
- package/dist/canvas-editor.umd.js +6 -6
- package/dist/canvas-editor.umd.js.map +1 -1
- package/dist/src/editor/core/command/Command.d.ts +3 -1
- package/dist/src/editor/core/command/CommandAdapt.d.ts +2 -1
- package/dist/src/editor/core/draw/Draw.d.ts +4 -1
- package/dist/src/editor/core/draw/frame/Background.d.ts +1 -1
- package/dist/src/editor/dataset/enum/Editor.d.ts +4 -0
- package/dist/src/editor/index.d.ts +2 -2
- package/dist/src/editor/interface/Editor.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IElement, ImageDisplay, INavigateInfo } from '../..';
|
|
2
|
-
import { EditorMode, PageMode } from '../../dataset/enum/Editor';
|
|
2
|
+
import { EditorMode, PageMode, PaperDirection } from '../../dataset/enum/Editor';
|
|
3
3
|
import { IDrawImagePayload, IPainterOptions } from '../../interface/Draw';
|
|
4
4
|
import { IEditorResult } from '../../interface/Editor';
|
|
5
5
|
import { IMargin } from '../../interface/Margin';
|
|
@@ -71,6 +71,7 @@ export declare class Command {
|
|
|
71
71
|
private static pageScaleMinus;
|
|
72
72
|
private static pageScaleAdd;
|
|
73
73
|
private static paperSize;
|
|
74
|
+
private static paperDirection;
|
|
74
75
|
private static getPaperMargin;
|
|
75
76
|
private static setPaperMargin;
|
|
76
77
|
private static insertElementList;
|
|
@@ -142,6 +143,7 @@ export declare class Command {
|
|
|
142
143
|
executePageScaleMinus(): void;
|
|
143
144
|
executePageScaleAdd(): void;
|
|
144
145
|
executePaperSize(width: number, height: number): void;
|
|
146
|
+
executePaperDirection(payload: PaperDirection): void;
|
|
145
147
|
getPaperMargin(): number[];
|
|
146
148
|
executeSetPaperMargin(payload: IMargin): void;
|
|
147
149
|
executeInsertElementList(payload: IElement[]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImageDisplay } from '../../dataset/enum/Control';
|
|
2
|
-
import { EditorMode, PageMode } from '../../dataset/enum/Editor';
|
|
2
|
+
import { EditorMode, PageMode, PaperDirection } from '../../dataset/enum/Editor';
|
|
3
3
|
import { RowFlex } from '../../dataset/enum/Row';
|
|
4
4
|
import { IDrawImagePayload, IPainterOptions } from '../../interface/Draw';
|
|
5
5
|
import { IEditorResult } from '../../interface/Editor';
|
|
@@ -85,6 +85,7 @@ export declare class CommandAdapt {
|
|
|
85
85
|
pageScaleMinus(): void;
|
|
86
86
|
pageScaleAdd(): void;
|
|
87
87
|
paperSize(width: number, height: number): void;
|
|
88
|
+
paperDirection(payload: PaperDirection): void;
|
|
88
89
|
getPaperMargin(): number[];
|
|
89
90
|
setPaperMargin(payload: IMargin): void;
|
|
90
91
|
insertElementList(payload: IElement[]): void;
|
|
@@ -12,7 +12,7 @@ import { Search } from './interactive/Search';
|
|
|
12
12
|
import { ImageParticle } from './particle/ImageParticle';
|
|
13
13
|
import { TableTool } from './particle/table/TableTool';
|
|
14
14
|
import { HyperlinkParticle } from './particle/HyperlinkParticle';
|
|
15
|
-
import { EditorMode, PageMode } from '../../dataset/enum/Editor';
|
|
15
|
+
import { EditorMode, PageMode, PaperDirection } from '../../dataset/enum/Editor';
|
|
16
16
|
import { Control } from './control/Control';
|
|
17
17
|
import { DeepRequired } from '../../interface/Common';
|
|
18
18
|
import { WorkerManager } from '../worker/WorkerManager';
|
|
@@ -77,6 +77,8 @@ export declare class Draw {
|
|
|
77
77
|
getMode(): EditorMode;
|
|
78
78
|
setMode(payload: EditorMode): void;
|
|
79
79
|
isReadonly(): boolean;
|
|
80
|
+
getOriginalWidth(): number;
|
|
81
|
+
getOriginalHeight(): number;
|
|
80
82
|
getWidth(): number;
|
|
81
83
|
getHeight(): number;
|
|
82
84
|
getCanvasWidth(pageNo?: number): number;
|
|
@@ -134,6 +136,7 @@ export declare class Draw {
|
|
|
134
136
|
setPageScale(payload: number): void;
|
|
135
137
|
setPageDevicePixel(): void;
|
|
136
138
|
setPaperSize(width: number, height: number): void;
|
|
139
|
+
setPaperDirection(payload: PaperDirection): void;
|
|
137
140
|
setPaperMargin(payload: IMargin): void;
|
|
138
141
|
getValue(): IEditorResult;
|
|
139
142
|
private _wrapContainer;
|
|
@@ -7,7 +7,7 @@ import { RowFlex } from './dataset/enum/Row';
|
|
|
7
7
|
import { ElementType } from './dataset/enum/Element';
|
|
8
8
|
import { Register } from './core/register/Register';
|
|
9
9
|
import { IContextMenuContext, IRegisterContextMenu } from './interface/contextmenu/ContextMenu';
|
|
10
|
-
import { EditorComponent, EditorMode, PageMode } from './dataset/enum/Editor';
|
|
10
|
+
import { EditorComponent, EditorMode, PageMode, PaperDirection } from './dataset/enum/Editor';
|
|
11
11
|
import { EDITOR_COMPONENT } from './dataset/constant/Editor';
|
|
12
12
|
import { IWatermark } from './interface/Watermark';
|
|
13
13
|
import { ControlType, ImageDisplay } from './dataset/enum/Control';
|
|
@@ -23,5 +23,5 @@ export default class Editor {
|
|
|
23
23
|
destroy: Function;
|
|
24
24
|
constructor(container: HTMLDivElement, elementList: IElement[], options?: IEditorOption);
|
|
25
25
|
}
|
|
26
|
-
export { Editor, RowFlex, EditorMode, ElementType, ControlType, EditorComponent, EDITOR_COMPONENT, PageMode, ImageDisplay, Command, KeyMap, BlockType };
|
|
26
|
+
export { Editor, RowFlex, EditorMode, ElementType, ControlType, EditorComponent, EDITOR_COMPONENT, PageMode, ImageDisplay, Command, KeyMap, BlockType, PaperDirection };
|
|
27
27
|
export type { IElement, IEditorOption, IEditorResult, IContextMenuContext, IRegisterContextMenu, IWatermark, INavigateInfo, IBlock, ILang };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IElement } from '..';
|
|
2
|
-
import { EditorMode, PageMode } from '../dataset/enum/Editor';
|
|
2
|
+
import { EditorMode, PageMode, PaperDirection } from '../dataset/enum/Editor';
|
|
3
3
|
import { ICheckboxOption } from './Checkbox';
|
|
4
4
|
import { IControlOption } from './Control';
|
|
5
5
|
import { ICursorOption } from './Cursor';
|
|
@@ -40,6 +40,7 @@ export interface IEditorOption {
|
|
|
40
40
|
defaultTdHeight?: number;
|
|
41
41
|
defaultHyperlinkColor?: string;
|
|
42
42
|
headerTop?: number;
|
|
43
|
+
paperDirection?: PaperDirection;
|
|
43
44
|
header?: IHeader;
|
|
44
45
|
watermark?: IWatermark;
|
|
45
46
|
control?: IControlOption;
|