@leapfrog/interactive-canvas 2.0.10 → 2.0.11
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/abstract-interactive-canvas.d.ts +372 -375
- package/dist/dimensions/millimeter-dimensions.d.ts +15 -15
- package/dist/dimensions/pixel-canvas-dimensions.d.ts +13 -13
- package/dist/dimensions/print-6-col-canvas-dimensions.d.ts +18 -18
- package/dist/dimensions/print-8-col-canvas-dimensions.d.ts +18 -18
- package/dist/font/font-library.d.ts +27 -27
- package/dist/font/font-library.interface.d.ts +24 -24
- package/dist/font/font.interface.d.ts +20 -20
- package/dist/font/unknown-font.d.ts +6 -6
- package/dist/headless-interactive-canvas.d.ts +10 -10
- package/dist/index.d.ts +54 -54
- package/dist/interactive-canvas.d.ts +25 -25
- package/dist/interactive-canvas.es.js +3905 -3910
- package/dist/interactive-canvas.interface.d.ts +297 -297
- package/dist/interactive-canvas.js +3902 -3907
- package/dist/layout/abstract-layout-manager.d.ts +17 -17
- package/dist/layout/advanced-layout-manager.d.ts +16 -16
- package/dist/layout/function/pin-to-bottom.layout-function.d.ts +4 -4
- package/dist/layout/function/redraw-all.layout-function.d.ts +4 -4
- package/dist/layout/function/reposition-backgrounds.layout-function.d.ts +4 -4
- package/dist/layout/function/reposition-borders.layout-function.d.ts +4 -4
- package/dist/layout/function/reposition-cutoffs.layout-function.d.ts +4 -4
- package/dist/layout/function/resize-canvas.layout-function.d.ts +4 -4
- package/dist/layout/function/stack-objects.layout-function.d.ts +11 -11
- package/dist/layout/function/update-object-dimensions.layout-function.d.ts +4 -4
- package/dist/layout/layout-manager.enum.d.ts +5 -5
- package/dist/layout/layout-manager.interface.d.ts +13 -13
- package/dist/layout/standard-layout-manager.d.ts +40 -40
- package/dist/mutator/mutable-background-color.interface.d.ts +15 -15
- package/dist/mutator/mutable-color.interface.d.ts +6 -6
- package/dist/mutator/mutable-image.interface.d.ts +28 -28
- package/dist/mutator/mutable-position.interface.d.ts +63 -63
- package/dist/mutator/mutable-stroke.interface.d.ts +8 -8
- package/dist/mutator/mutable-text-style.interface.d.ts +163 -163
- package/dist/mutator/mutable-text.interface.d.ts +80 -80
- package/dist/object/abstract-canvas-object.d.ts +207 -207
- package/dist/object/canvas-object-data.d.ts +24 -24
- package/dist/object/canvas-object.interface.d.ts +109 -109
- package/dist/object/impl/background-image.d.ts +38 -38
- package/dist/object/impl/border.d.ts +70 -70
- package/dist/object/impl/cutoff.d.ts +59 -59
- package/dist/object/impl/extended-fabric-object.interface.d.ts +7 -7
- package/dist/object/impl/extended-fabric-textbox.interface.d.ts +7 -7
- package/dist/object/impl/horizontal-rule.d.ts +83 -83
- package/dist/object/impl/image.d.ts +76 -76
- package/dist/object/impl/rectangle.d.ts +78 -78
- package/dist/object/impl/rich-text.d.ts +39 -39
- package/dist/object/impl/text.d.ts +314 -314
- package/dist/object/impl/vertical-rule.d.ts +83 -83
- package/dist/profile/canvas-profile.interface.d.ts +22 -22
- package/dist/profile/default-canvas-profile.d.ts +23 -23
- package/dist/types/canvas-dimension-restrictions.interface.d.ts +15 -15
- package/dist/types/canvas-dimensions.interface.d.ts +21 -21
- package/dist/types/canvas-state.interface.d.ts +11 -11
- package/dist/types/dimension-restrictions.interface.d.ts +6 -6
- package/dist/types/image-type.enum.d.ts +6 -6
- package/dist/types/margin.interface.d.ts +6 -6
- package/dist/types/object-dimensions.interface.d.ts +23 -23
- package/dist/types/object-type.enum.d.ts +12 -12
- package/dist/types/overflow.interface.d.ts +4 -4
- package/dist/types/position.interface.d.ts +9 -9
- package/dist/types/rect.interface.d.ts +6 -6
- package/dist/types/selection-data.interface.d.ts +19 -24
- package/dist/types/text-alignment.interface.d.ts +1 -1
- package/dist/undo-stack.d.ts +27 -27
- package/dist/undo-stack.interface.d.ts +6 -6
- package/package.json +1 -1
|
@@ -1,207 +1,207 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { ICanvasProfile, ILayoutManager, IMargin, IObjectDimensions, IOverflow, IPosition, ObjectType } from "..";
|
|
3
|
-
import { ICanvasObject } from "./canvas-object.interface";
|
|
4
|
-
import { CanvasObjectData } from "./canvas-object-data";
|
|
5
|
-
import { IInteractiveCanvas } from "../interactive-canvas.interface";
|
|
6
|
-
import { Object } from "fabric/fabric-impl";
|
|
7
|
-
export declare abstract class AbstractCanvasObject<T extends Object> implements ICanvasObject {
|
|
8
|
-
protected pinToBottomDistance: number;
|
|
9
|
-
protected canvas: IInteractiveCanvas;
|
|
10
|
-
protected fabricObject: T;
|
|
11
|
-
protected data: CanvasObjectData;
|
|
12
|
-
private readonly dimensions$;
|
|
13
|
-
private readonly opacity$;
|
|
14
|
-
/**
|
|
15
|
-
* Create a new instance.
|
|
16
|
-
* @param type Object type.
|
|
17
|
-
* @param canvas Interactive canvas that the field will be rendered on.
|
|
18
|
-
* @param fabricObject The fabric object to bind this field to.
|
|
19
|
-
* @param data Existing persisted field data to load from, if applicable.
|
|
20
|
-
*/
|
|
21
|
-
protected constructor(type: ObjectType, canvas: IInteractiveCanvas, fabricObject: any, data?: CanvasObjectData);
|
|
22
|
-
/**
|
|
23
|
-
* @override
|
|
24
|
-
* @inheritDoc
|
|
25
|
-
*/
|
|
26
|
-
getId(): string;
|
|
27
|
-
/**
|
|
28
|
-
* @override
|
|
29
|
-
* @inheritDoc
|
|
30
|
-
*/
|
|
31
|
-
getType(): ObjectType;
|
|
32
|
-
/**
|
|
33
|
-
* @override
|
|
34
|
-
* @inheritDoc
|
|
35
|
-
*/
|
|
36
|
-
getDescription(): string;
|
|
37
|
-
/**
|
|
38
|
-
* @override
|
|
39
|
-
* @inheritDoc
|
|
40
|
-
*/
|
|
41
|
-
setSortCaption(value: boolean): void;
|
|
42
|
-
/**
|
|
43
|
-
* @override
|
|
44
|
-
* @inheritDoc
|
|
45
|
-
*/
|
|
46
|
-
isSortCaption(): boolean;
|
|
47
|
-
/**
|
|
48
|
-
* @override
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
51
|
-
getDimensions(): IObjectDimensions;
|
|
52
|
-
/**
|
|
53
|
-
* @override
|
|
54
|
-
* @inheritDoc
|
|
55
|
-
*/
|
|
56
|
-
getDimensions$(): Observable<IObjectDimensions>;
|
|
57
|
-
/**
|
|
58
|
-
* @override
|
|
59
|
-
* @inheritDoc
|
|
60
|
-
*/
|
|
61
|
-
getOpacity(): number;
|
|
62
|
-
/**
|
|
63
|
-
* @override
|
|
64
|
-
* @inheritDoc
|
|
65
|
-
*/
|
|
66
|
-
getOpacity$(): Observable<number>;
|
|
67
|
-
/**
|
|
68
|
-
* @override
|
|
69
|
-
* @inheritDoc
|
|
70
|
-
*/
|
|
71
|
-
setOpacity(value: number): void;
|
|
72
|
-
/**
|
|
73
|
-
* @override
|
|
74
|
-
* @inheritDoc
|
|
75
|
-
*/
|
|
76
|
-
getMargin(): IMargin;
|
|
77
|
-
/**
|
|
78
|
-
* @override
|
|
79
|
-
* @inheritDoc
|
|
80
|
-
*/
|
|
81
|
-
setMargin(margin: IMargin): void;
|
|
82
|
-
/**
|
|
83
|
-
* @override
|
|
84
|
-
* @inheritDoc
|
|
85
|
-
*/
|
|
86
|
-
getColumnWidthPercent(): number;
|
|
87
|
-
/**
|
|
88
|
-
* @override
|
|
89
|
-
* @inheritDoc
|
|
90
|
-
*/
|
|
91
|
-
setColumnWidthPercent(percent: number): void;
|
|
92
|
-
/**
|
|
93
|
-
* @override
|
|
94
|
-
* @inheritDoc
|
|
95
|
-
*/
|
|
96
|
-
bringForward(): void;
|
|
97
|
-
/**
|
|
98
|
-
* @override
|
|
99
|
-
* @inheritDoc
|
|
100
|
-
*/
|
|
101
|
-
bringToFront(): void;
|
|
102
|
-
/**
|
|
103
|
-
* @override
|
|
104
|
-
* @inheritDoc
|
|
105
|
-
*/
|
|
106
|
-
sendBackward(): void;
|
|
107
|
-
/**
|
|
108
|
-
* @override
|
|
109
|
-
* @inheritDoc
|
|
110
|
-
*/
|
|
111
|
-
sendToBack(): void;
|
|
112
|
-
/**
|
|
113
|
-
* @override
|
|
114
|
-
* @inheritDoc
|
|
115
|
-
*/
|
|
116
|
-
moveUp(): void;
|
|
117
|
-
/**
|
|
118
|
-
* @override
|
|
119
|
-
* @inheritDoc
|
|
120
|
-
*/
|
|
121
|
-
moveDown(): void;
|
|
122
|
-
/**
|
|
123
|
-
* @override
|
|
124
|
-
* @inheritDoc
|
|
125
|
-
*/
|
|
126
|
-
delete(): void;
|
|
127
|
-
/**
|
|
128
|
-
* @override
|
|
129
|
-
* @inheritDoc
|
|
130
|
-
*/
|
|
131
|
-
persist(): CanvasObjectData;
|
|
132
|
-
/**
|
|
133
|
-
* @override
|
|
134
|
-
* @inheritDoc
|
|
135
|
-
*/
|
|
136
|
-
isPinToBottom(): boolean;
|
|
137
|
-
/**
|
|
138
|
-
* @override
|
|
139
|
-
* @inheritDoc
|
|
140
|
-
*/
|
|
141
|
-
setPinToBottom(value?: boolean): void;
|
|
142
|
-
/**
|
|
143
|
-
* @override
|
|
144
|
-
* @inheritDoc
|
|
145
|
-
*/
|
|
146
|
-
setLeft(left: number): void;
|
|
147
|
-
/**
|
|
148
|
-
* @override
|
|
149
|
-
* @inheritDoc
|
|
150
|
-
*/
|
|
151
|
-
setTop(top: number): void;
|
|
152
|
-
/**
|
|
153
|
-
* @override
|
|
154
|
-
* @inheritDoc
|
|
155
|
-
*/
|
|
156
|
-
setHeight(height: number): void;
|
|
157
|
-
/**
|
|
158
|
-
* @override
|
|
159
|
-
* @inheritDoc
|
|
160
|
-
*/
|
|
161
|
-
setWidth(width: number): void;
|
|
162
|
-
/**
|
|
163
|
-
* @override
|
|
164
|
-
* @inheritDoc
|
|
165
|
-
*/
|
|
166
|
-
setAngle(angle: number): void;
|
|
167
|
-
/**
|
|
168
|
-
* @override
|
|
169
|
-
* @inheritDoc
|
|
170
|
-
*/
|
|
171
|
-
setScaleX(scale: number): void;
|
|
172
|
-
/**
|
|
173
|
-
* @override
|
|
174
|
-
* @inheritDoc
|
|
175
|
-
*/
|
|
176
|
-
setScaleY(scale: number): void;
|
|
177
|
-
/**
|
|
178
|
-
* Get the underlying fabric object.
|
|
179
|
-
* (Internal use only, do not expose this outside the canvas module).
|
|
180
|
-
*/
|
|
181
|
-
getFabricObjectInternal(): T;
|
|
182
|
-
setPosition(position: IPosition): void;
|
|
183
|
-
setCoords(): void;
|
|
184
|
-
updateDimensions(): void;
|
|
185
|
-
getBoundingBox(): {
|
|
186
|
-
top: number;
|
|
187
|
-
left: number;
|
|
188
|
-
width: number;
|
|
189
|
-
height: number;
|
|
190
|
-
};
|
|
191
|
-
moveToPinnedPosition(): void;
|
|
192
|
-
protected updatePinToBottomDistance(): void;
|
|
193
|
-
protected redraw(): void;
|
|
194
|
-
protected onProfileChange(profile: ICanvasProfile): void;
|
|
195
|
-
protected onLayoutManagerChange(layoutManager: ILayoutManager): void;
|
|
196
|
-
protected onMove(event: any): void;
|
|
197
|
-
protected onRotate(event: any): void;
|
|
198
|
-
protected onScale(event: any): void;
|
|
199
|
-
protected afterScale(event: any): void;
|
|
200
|
-
protected onDelete(): void;
|
|
201
|
-
protected preventLeavingCanvas(): void;
|
|
202
|
-
protected getCanvasOverflow(): IOverflow;
|
|
203
|
-
protected centerHorizontallyInternal(): void;
|
|
204
|
-
protected centerVerticallyInternal(): void;
|
|
205
|
-
protected nudgeInternal(x?: number, y?: number): void;
|
|
206
|
-
protected updateFabricObjectBehavior(): void;
|
|
207
|
-
}
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { ICanvasProfile, ILayoutManager, IMargin, IObjectDimensions, IOverflow, IPosition, ObjectType } from "..";
|
|
3
|
+
import { ICanvasObject } from "./canvas-object.interface";
|
|
4
|
+
import { CanvasObjectData } from "./canvas-object-data";
|
|
5
|
+
import { IInteractiveCanvas } from "../interactive-canvas.interface";
|
|
6
|
+
import { Object } from "fabric/fabric-impl";
|
|
7
|
+
export declare abstract class AbstractCanvasObject<T extends Object> implements ICanvasObject {
|
|
8
|
+
protected pinToBottomDistance: number;
|
|
9
|
+
protected canvas: IInteractiveCanvas;
|
|
10
|
+
protected fabricObject: T;
|
|
11
|
+
protected data: CanvasObjectData;
|
|
12
|
+
private readonly dimensions$;
|
|
13
|
+
private readonly opacity$;
|
|
14
|
+
/**
|
|
15
|
+
* Create a new instance.
|
|
16
|
+
* @param type Object type.
|
|
17
|
+
* @param canvas Interactive canvas that the field will be rendered on.
|
|
18
|
+
* @param fabricObject The fabric object to bind this field to.
|
|
19
|
+
* @param data Existing persisted field data to load from, if applicable.
|
|
20
|
+
*/
|
|
21
|
+
protected constructor(type: ObjectType, canvas: IInteractiveCanvas, fabricObject: any, data?: CanvasObjectData);
|
|
22
|
+
/**
|
|
23
|
+
* @override
|
|
24
|
+
* @inheritDoc
|
|
25
|
+
*/
|
|
26
|
+
getId(): string;
|
|
27
|
+
/**
|
|
28
|
+
* @override
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
getType(): ObjectType;
|
|
32
|
+
/**
|
|
33
|
+
* @override
|
|
34
|
+
* @inheritDoc
|
|
35
|
+
*/
|
|
36
|
+
getDescription(): string;
|
|
37
|
+
/**
|
|
38
|
+
* @override
|
|
39
|
+
* @inheritDoc
|
|
40
|
+
*/
|
|
41
|
+
setSortCaption(value: boolean): void;
|
|
42
|
+
/**
|
|
43
|
+
* @override
|
|
44
|
+
* @inheritDoc
|
|
45
|
+
*/
|
|
46
|
+
isSortCaption(): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* @override
|
|
49
|
+
* @inheritDoc
|
|
50
|
+
*/
|
|
51
|
+
getDimensions(): IObjectDimensions;
|
|
52
|
+
/**
|
|
53
|
+
* @override
|
|
54
|
+
* @inheritDoc
|
|
55
|
+
*/
|
|
56
|
+
getDimensions$(): Observable<IObjectDimensions>;
|
|
57
|
+
/**
|
|
58
|
+
* @override
|
|
59
|
+
* @inheritDoc
|
|
60
|
+
*/
|
|
61
|
+
getOpacity(): number;
|
|
62
|
+
/**
|
|
63
|
+
* @override
|
|
64
|
+
* @inheritDoc
|
|
65
|
+
*/
|
|
66
|
+
getOpacity$(): Observable<number>;
|
|
67
|
+
/**
|
|
68
|
+
* @override
|
|
69
|
+
* @inheritDoc
|
|
70
|
+
*/
|
|
71
|
+
setOpacity(value: number): void;
|
|
72
|
+
/**
|
|
73
|
+
* @override
|
|
74
|
+
* @inheritDoc
|
|
75
|
+
*/
|
|
76
|
+
getMargin(): IMargin;
|
|
77
|
+
/**
|
|
78
|
+
* @override
|
|
79
|
+
* @inheritDoc
|
|
80
|
+
*/
|
|
81
|
+
setMargin(margin: IMargin): void;
|
|
82
|
+
/**
|
|
83
|
+
* @override
|
|
84
|
+
* @inheritDoc
|
|
85
|
+
*/
|
|
86
|
+
getColumnWidthPercent(): number;
|
|
87
|
+
/**
|
|
88
|
+
* @override
|
|
89
|
+
* @inheritDoc
|
|
90
|
+
*/
|
|
91
|
+
setColumnWidthPercent(percent: number): void;
|
|
92
|
+
/**
|
|
93
|
+
* @override
|
|
94
|
+
* @inheritDoc
|
|
95
|
+
*/
|
|
96
|
+
bringForward(): void;
|
|
97
|
+
/**
|
|
98
|
+
* @override
|
|
99
|
+
* @inheritDoc
|
|
100
|
+
*/
|
|
101
|
+
bringToFront(): void;
|
|
102
|
+
/**
|
|
103
|
+
* @override
|
|
104
|
+
* @inheritDoc
|
|
105
|
+
*/
|
|
106
|
+
sendBackward(): void;
|
|
107
|
+
/**
|
|
108
|
+
* @override
|
|
109
|
+
* @inheritDoc
|
|
110
|
+
*/
|
|
111
|
+
sendToBack(): void;
|
|
112
|
+
/**
|
|
113
|
+
* @override
|
|
114
|
+
* @inheritDoc
|
|
115
|
+
*/
|
|
116
|
+
moveUp(): void;
|
|
117
|
+
/**
|
|
118
|
+
* @override
|
|
119
|
+
* @inheritDoc
|
|
120
|
+
*/
|
|
121
|
+
moveDown(): void;
|
|
122
|
+
/**
|
|
123
|
+
* @override
|
|
124
|
+
* @inheritDoc
|
|
125
|
+
*/
|
|
126
|
+
delete(): void;
|
|
127
|
+
/**
|
|
128
|
+
* @override
|
|
129
|
+
* @inheritDoc
|
|
130
|
+
*/
|
|
131
|
+
persist(): CanvasObjectData;
|
|
132
|
+
/**
|
|
133
|
+
* @override
|
|
134
|
+
* @inheritDoc
|
|
135
|
+
*/
|
|
136
|
+
isPinToBottom(): boolean;
|
|
137
|
+
/**
|
|
138
|
+
* @override
|
|
139
|
+
* @inheritDoc
|
|
140
|
+
*/
|
|
141
|
+
setPinToBottom(value?: boolean): void;
|
|
142
|
+
/**
|
|
143
|
+
* @override
|
|
144
|
+
* @inheritDoc
|
|
145
|
+
*/
|
|
146
|
+
setLeft(left: number): void;
|
|
147
|
+
/**
|
|
148
|
+
* @override
|
|
149
|
+
* @inheritDoc
|
|
150
|
+
*/
|
|
151
|
+
setTop(top: number): void;
|
|
152
|
+
/**
|
|
153
|
+
* @override
|
|
154
|
+
* @inheritDoc
|
|
155
|
+
*/
|
|
156
|
+
setHeight(height: number): void;
|
|
157
|
+
/**
|
|
158
|
+
* @override
|
|
159
|
+
* @inheritDoc
|
|
160
|
+
*/
|
|
161
|
+
setWidth(width: number): void;
|
|
162
|
+
/**
|
|
163
|
+
* @override
|
|
164
|
+
* @inheritDoc
|
|
165
|
+
*/
|
|
166
|
+
setAngle(angle: number): void;
|
|
167
|
+
/**
|
|
168
|
+
* @override
|
|
169
|
+
* @inheritDoc
|
|
170
|
+
*/
|
|
171
|
+
setScaleX(scale: number): void;
|
|
172
|
+
/**
|
|
173
|
+
* @override
|
|
174
|
+
* @inheritDoc
|
|
175
|
+
*/
|
|
176
|
+
setScaleY(scale: number): void;
|
|
177
|
+
/**
|
|
178
|
+
* Get the underlying fabric object.
|
|
179
|
+
* (Internal use only, do not expose this outside the canvas module).
|
|
180
|
+
*/
|
|
181
|
+
getFabricObjectInternal(): T;
|
|
182
|
+
setPosition(position: IPosition): void;
|
|
183
|
+
setCoords(): void;
|
|
184
|
+
updateDimensions(): void;
|
|
185
|
+
getBoundingBox(): {
|
|
186
|
+
top: number;
|
|
187
|
+
left: number;
|
|
188
|
+
width: number;
|
|
189
|
+
height: number;
|
|
190
|
+
};
|
|
191
|
+
moveToPinnedPosition(): void;
|
|
192
|
+
protected updatePinToBottomDistance(): void;
|
|
193
|
+
protected redraw(): void;
|
|
194
|
+
protected onProfileChange(profile: ICanvasProfile): void;
|
|
195
|
+
protected onLayoutManagerChange(layoutManager: ILayoutManager): void;
|
|
196
|
+
protected onMove(event: any): void;
|
|
197
|
+
protected onRotate(event: any): void;
|
|
198
|
+
protected onScale(event: any): void;
|
|
199
|
+
protected afterScale(event: any): void;
|
|
200
|
+
protected onDelete(): void;
|
|
201
|
+
protected preventLeavingCanvas(): void;
|
|
202
|
+
protected getCanvasOverflow(): IOverflow;
|
|
203
|
+
protected centerHorizontallyInternal(): void;
|
|
204
|
+
protected centerVerticallyInternal(): void;
|
|
205
|
+
protected nudgeInternal(x?: number, y?: number): void;
|
|
206
|
+
protected updateFabricObjectBehavior(): void;
|
|
207
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { IMargin, IRect, ObjectType } from "..";
|
|
2
|
-
/**
|
|
3
|
-
* Data for a persisted canvas object.
|
|
4
|
-
*/
|
|
5
|
-
export declare class CanvasObjectData {
|
|
6
|
-
type: ObjectType;
|
|
7
|
-
id: string;
|
|
8
|
-
fieldName?: string;
|
|
9
|
-
pinToBottom?: boolean;
|
|
10
|
-
margin?: IMargin;
|
|
11
|
-
columnWidthPercent?: number;
|
|
12
|
-
color?: string;
|
|
13
|
-
strokeWidth?: number;
|
|
14
|
-
padding?: IRect;
|
|
15
|
-
editable?: boolean;
|
|
16
|
-
prefillType: string;
|
|
17
|
-
sortCaption?: boolean;
|
|
18
|
-
resizeCanvas: boolean;
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
userText?: string;
|
|
21
|
-
bulleted?: boolean;
|
|
22
|
-
imagePath?: string;
|
|
23
|
-
constructor(type: ObjectType, id: string);
|
|
24
|
-
}
|
|
1
|
+
import { IMargin, IRect, ObjectType } from "..";
|
|
2
|
+
/**
|
|
3
|
+
* Data for a persisted canvas object.
|
|
4
|
+
*/
|
|
5
|
+
export declare class CanvasObjectData {
|
|
6
|
+
type: ObjectType;
|
|
7
|
+
id: string;
|
|
8
|
+
fieldName?: string;
|
|
9
|
+
pinToBottom?: boolean;
|
|
10
|
+
margin?: IMargin;
|
|
11
|
+
columnWidthPercent?: number;
|
|
12
|
+
color?: string;
|
|
13
|
+
strokeWidth?: number;
|
|
14
|
+
padding?: IRect;
|
|
15
|
+
editable?: boolean;
|
|
16
|
+
prefillType: string;
|
|
17
|
+
sortCaption?: boolean;
|
|
18
|
+
resizeCanvas: boolean;
|
|
19
|
+
placeholder?: string;
|
|
20
|
+
userText?: string;
|
|
21
|
+
bulleted?: boolean;
|
|
22
|
+
imagePath?: string;
|
|
23
|
+
constructor(type: ObjectType, id: string);
|
|
24
|
+
}
|
|
@@ -1,109 +1,109 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { IMargin, IObjectDimensions, ObjectType } from "..";
|
|
3
|
-
import { CanvasObjectData } from "./canvas-object-data";
|
|
4
|
-
/**
|
|
5
|
-
* An object rendered on the {@link IInteractiveCanvas Interactive Canvas}.
|
|
6
|
-
*/
|
|
7
|
-
export interface ICanvasObject {
|
|
8
|
-
/**
|
|
9
|
-
* Get the field id.
|
|
10
|
-
*/
|
|
11
|
-
getId(): string;
|
|
12
|
-
/**
|
|
13
|
-
* Get the field type.
|
|
14
|
-
*/
|
|
15
|
-
getType(): ObjectType;
|
|
16
|
-
/**
|
|
17
|
-
* Get the field description, a user-friendly version of Type.
|
|
18
|
-
*/
|
|
19
|
-
getDescription(): string;
|
|
20
|
-
/**
|
|
21
|
-
* Set whether this field is to be used for the sort caption.
|
|
22
|
-
*/
|
|
23
|
-
setSortCaption(value: boolean): void;
|
|
24
|
-
/**
|
|
25
|
-
* True if this field is a sort caption.
|
|
26
|
-
*/
|
|
27
|
-
isSortCaption(): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Get object dimensions.
|
|
30
|
-
* @see IObjectDimensions.
|
|
31
|
-
*/
|
|
32
|
-
getDimensions(): IObjectDimensions;
|
|
33
|
-
/**
|
|
34
|
-
* Get an observable for the field dimensions.
|
|
35
|
-
*/
|
|
36
|
-
getDimensions$(): Observable<IObjectDimensions>;
|
|
37
|
-
/**
|
|
38
|
-
* Get object opacity.
|
|
39
|
-
*/
|
|
40
|
-
getOpacity(): number;
|
|
41
|
-
/**
|
|
42
|
-
* Get an observable for the object opacity.
|
|
43
|
-
*/
|
|
44
|
-
getOpacity$(): Observable<number>;
|
|
45
|
-
/**
|
|
46
|
-
* Set the object opacity.
|
|
47
|
-
* @param value Opacity.
|
|
48
|
-
*/
|
|
49
|
-
setOpacity(value: number): void;
|
|
50
|
-
/**
|
|
51
|
-
* Get the component margin.
|
|
52
|
-
*/
|
|
53
|
-
getMargin(): IMargin;
|
|
54
|
-
/**
|
|
55
|
-
* Set component margin.
|
|
56
|
-
* @param margin New margin.
|
|
57
|
-
*/
|
|
58
|
-
setMargin(margin: IMargin): void;
|
|
59
|
-
/**
|
|
60
|
-
* Get the column width percentage.
|
|
61
|
-
*/
|
|
62
|
-
getColumnWidthPercent(): number;
|
|
63
|
-
/**
|
|
64
|
-
* Set column width percentage.
|
|
65
|
-
* @param percent New value.
|
|
66
|
-
*/
|
|
67
|
-
setColumnWidthPercent(percent: number): void;
|
|
68
|
-
/**
|
|
69
|
-
* Bring object to front.
|
|
70
|
-
*/
|
|
71
|
-
bringToFront(): void;
|
|
72
|
-
/**
|
|
73
|
-
* Bring object forward one place.
|
|
74
|
-
*/
|
|
75
|
-
bringForward(): void;
|
|
76
|
-
/**
|
|
77
|
-
* Send object backward one place.
|
|
78
|
-
*/
|
|
79
|
-
sendBackward(): void;
|
|
80
|
-
/**
|
|
81
|
-
* Send object to the back.
|
|
82
|
-
*/
|
|
83
|
-
sendToBack(): void;
|
|
84
|
-
/**
|
|
85
|
-
* Move the object up in the object list.
|
|
86
|
-
*/
|
|
87
|
-
moveUp(): void;
|
|
88
|
-
/**
|
|
89
|
-
* Move the object down in the object list.
|
|
90
|
-
*/
|
|
91
|
-
moveDown(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Delete this object, removing it from the canvas.
|
|
94
|
-
*/
|
|
95
|
-
delete(): void;
|
|
96
|
-
/**
|
|
97
|
-
* Persist this object, returning a copy of the data block.
|
|
98
|
-
*/
|
|
99
|
-
persist(): CanvasObjectData;
|
|
100
|
-
/**
|
|
101
|
-
* Get whether the object is pinned to the bottom of the canvas.
|
|
102
|
-
*/
|
|
103
|
-
isPinToBottom(): boolean;
|
|
104
|
-
/**
|
|
105
|
-
* Set whether the object is pinned to the bottom of the canvas.
|
|
106
|
-
* @param value New value.
|
|
107
|
-
*/
|
|
108
|
-
setPinToBottom(value?: boolean): void;
|
|
109
|
-
}
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { IMargin, IObjectDimensions, ObjectType } from "..";
|
|
3
|
+
import { CanvasObjectData } from "./canvas-object-data";
|
|
4
|
+
/**
|
|
5
|
+
* An object rendered on the {@link IInteractiveCanvas Interactive Canvas}.
|
|
6
|
+
*/
|
|
7
|
+
export interface ICanvasObject {
|
|
8
|
+
/**
|
|
9
|
+
* Get the field id.
|
|
10
|
+
*/
|
|
11
|
+
getId(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Get the field type.
|
|
14
|
+
*/
|
|
15
|
+
getType(): ObjectType;
|
|
16
|
+
/**
|
|
17
|
+
* Get the field description, a user-friendly version of Type.
|
|
18
|
+
*/
|
|
19
|
+
getDescription(): string;
|
|
20
|
+
/**
|
|
21
|
+
* Set whether this field is to be used for the sort caption.
|
|
22
|
+
*/
|
|
23
|
+
setSortCaption(value: boolean): void;
|
|
24
|
+
/**
|
|
25
|
+
* True if this field is a sort caption.
|
|
26
|
+
*/
|
|
27
|
+
isSortCaption(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Get object dimensions.
|
|
30
|
+
* @see IObjectDimensions.
|
|
31
|
+
*/
|
|
32
|
+
getDimensions(): IObjectDimensions;
|
|
33
|
+
/**
|
|
34
|
+
* Get an observable for the field dimensions.
|
|
35
|
+
*/
|
|
36
|
+
getDimensions$(): Observable<IObjectDimensions>;
|
|
37
|
+
/**
|
|
38
|
+
* Get object opacity.
|
|
39
|
+
*/
|
|
40
|
+
getOpacity(): number;
|
|
41
|
+
/**
|
|
42
|
+
* Get an observable for the object opacity.
|
|
43
|
+
*/
|
|
44
|
+
getOpacity$(): Observable<number>;
|
|
45
|
+
/**
|
|
46
|
+
* Set the object opacity.
|
|
47
|
+
* @param value Opacity.
|
|
48
|
+
*/
|
|
49
|
+
setOpacity(value: number): void;
|
|
50
|
+
/**
|
|
51
|
+
* Get the component margin.
|
|
52
|
+
*/
|
|
53
|
+
getMargin(): IMargin;
|
|
54
|
+
/**
|
|
55
|
+
* Set component margin.
|
|
56
|
+
* @param margin New margin.
|
|
57
|
+
*/
|
|
58
|
+
setMargin(margin: IMargin): void;
|
|
59
|
+
/**
|
|
60
|
+
* Get the column width percentage.
|
|
61
|
+
*/
|
|
62
|
+
getColumnWidthPercent(): number;
|
|
63
|
+
/**
|
|
64
|
+
* Set column width percentage.
|
|
65
|
+
* @param percent New value.
|
|
66
|
+
*/
|
|
67
|
+
setColumnWidthPercent(percent: number): void;
|
|
68
|
+
/**
|
|
69
|
+
* Bring object to front.
|
|
70
|
+
*/
|
|
71
|
+
bringToFront(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Bring object forward one place.
|
|
74
|
+
*/
|
|
75
|
+
bringForward(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Send object backward one place.
|
|
78
|
+
*/
|
|
79
|
+
sendBackward(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Send object to the back.
|
|
82
|
+
*/
|
|
83
|
+
sendToBack(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Move the object up in the object list.
|
|
86
|
+
*/
|
|
87
|
+
moveUp(): void;
|
|
88
|
+
/**
|
|
89
|
+
* Move the object down in the object list.
|
|
90
|
+
*/
|
|
91
|
+
moveDown(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Delete this object, removing it from the canvas.
|
|
94
|
+
*/
|
|
95
|
+
delete(): void;
|
|
96
|
+
/**
|
|
97
|
+
* Persist this object, returning a copy of the data block.
|
|
98
|
+
*/
|
|
99
|
+
persist(): CanvasObjectData;
|
|
100
|
+
/**
|
|
101
|
+
* Get whether the object is pinned to the bottom of the canvas.
|
|
102
|
+
*/
|
|
103
|
+
isPinToBottom(): boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Set whether the object is pinned to the bottom of the canvas.
|
|
106
|
+
* @param value New value.
|
|
107
|
+
*/
|
|
108
|
+
setPinToBottom(value?: boolean): void;
|
|
109
|
+
}
|