@leapfrog/interactive-canvas 1.0.0 → 1.0.2
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/package.json +1 -1
- package/dist/abstract-interactive-canvas.d.ts +0 -340
- package/dist/dimensions/pixel-canvas-dimensions.d.ts +0 -13
- package/dist/dimensions/print-6-col-canvas-dimensions.d.ts +0 -18
- package/dist/dimensions/print-8-col-canvas-dimensions.d.ts +0 -18
- package/dist/font/font-library.d.ts +0 -27
- package/dist/font/font-library.interface.d.ts +0 -24
- package/dist/font/font.interface.d.ts +0 -20
- package/dist/font/unknown-font.d.ts +0 -6
- package/dist/headless-interactive-canvas.d.ts +0 -9
- package/dist/index.d.ts +0 -49
- package/dist/interactive-canvas.d.ts +0 -8
- package/dist/interactive-canvas.es.js +0 -3193
- package/dist/interactive-canvas.interface.d.ts +0 -267
- package/dist/interactive-canvas.js +0 -3222
- package/dist/layout/abstract-layout-manager.d.ts +0 -17
- package/dist/layout/advanced-layout-manager.d.ts +0 -15
- package/dist/layout/function/pin-to-bottom.layout-function.d.ts +0 -4
- package/dist/layout/function/redraw-all.layout-function.d.ts +0 -4
- package/dist/layout/function/reposition-borders.layout-function.d.ts +0 -4
- package/dist/layout/function/reposition-cutoffs.layout-function.d.ts +0 -4
- package/dist/layout/function/resize-canvas.layout-function.d.ts +0 -4
- package/dist/layout/function/stack-objects.layout-function.d.ts +0 -11
- package/dist/layout/function/update-object-dimensions.layout-function.d.ts +0 -4
- package/dist/layout/layout-manager.enum.d.ts +0 -5
- package/dist/layout/layout-manager.interface.d.ts +0 -13
- package/dist/layout/standard-layout-manager.d.ts +0 -35
- package/dist/mutator/mutable-background-color.interface.d.ts +0 -15
- package/dist/mutator/mutable-color.interface.d.ts +0 -6
- package/dist/mutator/mutable-image.interface.d.ts +0 -28
- package/dist/mutator/mutable-position.interface.d.ts +0 -33
- package/dist/mutator/mutable-text-style.interface.d.ts +0 -163
- package/dist/mutator/mutable-text.interface.d.ts +0 -40
- package/dist/object/abstract-canvas-object.d.ts +0 -155
- package/dist/object/canvas-object-data.d.ts +0 -23
- package/dist/object/canvas-object.interface.d.ts +0 -96
- package/dist/object/impl/border.d.ts +0 -59
- package/dist/object/impl/cutoff.d.ts +0 -59
- package/dist/object/impl/horizontal-rule.d.ts +0 -88
- package/dist/object/impl/image.d.ts +0 -81
- package/dist/object/impl/rectangle.d.ts +0 -58
- package/dist/object/impl/text.d.ts +0 -264
- package/dist/object/impl/vertical-rule.d.ts +0 -88
- package/dist/profile/canvas-profile.interface.d.ts +0 -22
- package/dist/profile/default-canvas-profile.d.ts +0 -23
- package/dist/types/canvas-dimension-restrictions.interface.d.ts +0 -14
- package/dist/types/canvas-dimensions.interface.d.ts +0 -21
- package/dist/types/canvas-state.interface.d.ts +0 -11
- package/dist/types/dimension-restrictions.interface.d.ts +0 -6
- package/dist/types/image-type.enum.d.ts +0 -6
- package/dist/types/margin.interface.d.ts +0 -6
- package/dist/types/object-dimensions.interface.d.ts +0 -23
- package/dist/types/object-type.enum.d.ts +0 -10
- package/dist/types/overflow.interface.d.ts +0 -4
- package/dist/types/position.interface.d.ts +0 -6
- package/dist/types/rect.interface.d.ts +0 -6
- package/dist/types/selection-data.interface.d.ts +0 -19
- package/dist/types/text-alignment.interface.d.ts +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ILayoutManager } from "./layout-manager.interface";
|
|
2
|
-
import { LayoutManager } from "./layout-manager.enum";
|
|
3
|
-
import { ICanvasProfile, IInteractiveCanvas } from "..";
|
|
4
|
-
export declare abstract class AbstractLayoutManager implements ILayoutManager {
|
|
5
|
-
abstract readonly key: LayoutManager;
|
|
6
|
-
readonly isEnforcedPositioning: boolean;
|
|
7
|
-
readonly enterTextEditImmediatelyOnSelect: boolean;
|
|
8
|
-
protected canvas: IInteractiveCanvas;
|
|
9
|
-
protected constructor(canvas: IInteractiveCanvas);
|
|
10
|
-
getCanvas(): IInteractiveCanvas;
|
|
11
|
-
onInit(): void;
|
|
12
|
-
onProfileChange(profile: ICanvasProfile): void;
|
|
13
|
-
onCanvasDimensionsChange(): void;
|
|
14
|
-
onTextChange(): void;
|
|
15
|
-
onObjectListChange(): void;
|
|
16
|
-
onMarginChange(): void;
|
|
17
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { AbstractLayoutManager } from "./abstract-layout-manager";
|
|
2
|
-
import { LayoutManager } from "./layout-manager.enum";
|
|
3
|
-
import { IInteractiveCanvas } from "../interactive-canvas.interface";
|
|
4
|
-
export declare class AdvancedLayoutManager extends AbstractLayoutManager {
|
|
5
|
-
readonly key: LayoutManager;
|
|
6
|
-
private pinToBottom;
|
|
7
|
-
private redrawAll;
|
|
8
|
-
private repositionBorders;
|
|
9
|
-
private repositionCutoffs;
|
|
10
|
-
private resizeCanvas;
|
|
11
|
-
constructor(canvas: IInteractiveCanvas);
|
|
12
|
-
onCanvasDimensionsChange(): void;
|
|
13
|
-
onTextChange(): void;
|
|
14
|
-
onObjectListChange(): void;
|
|
15
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../../interactive-canvas.interface";
|
|
2
|
-
export declare class StackObjectsLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
private layoutFooter;
|
|
5
|
-
private layoutBody;
|
|
6
|
-
private applyWidths;
|
|
7
|
-
private adjustCanvasSize;
|
|
8
|
-
private getRows;
|
|
9
|
-
private getObjectHeight;
|
|
10
|
-
private countSpaces;
|
|
11
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { LayoutManager } from "./layout-manager.enum";
|
|
2
|
-
import { ICanvasProfile } from "..";
|
|
3
|
-
export interface ILayoutManager {
|
|
4
|
-
readonly key: LayoutManager;
|
|
5
|
-
readonly isEnforcedPositioning: boolean;
|
|
6
|
-
readonly enterTextEditImmediatelyOnSelect: boolean;
|
|
7
|
-
onInit(): void;
|
|
8
|
-
onProfileChange(profile: ICanvasProfile): void;
|
|
9
|
-
onCanvasDimensionsChange(): void;
|
|
10
|
-
onTextChange(): void;
|
|
11
|
-
onObjectListChange(): void;
|
|
12
|
-
onMarginChange(): void;
|
|
13
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { AbstractLayoutManager } from "./abstract-layout-manager";
|
|
2
|
-
import { LayoutManager } from "./layout-manager.enum";
|
|
3
|
-
import { ICanvasProfile, IInteractiveCanvas } from "..";
|
|
4
|
-
export declare class StandardLayoutManager extends AbstractLayoutManager {
|
|
5
|
-
readonly key: LayoutManager;
|
|
6
|
-
readonly isEnforcedPositioning: boolean;
|
|
7
|
-
readonly enterTextEditImmediatelyOnSelect: boolean;
|
|
8
|
-
private redrawAll;
|
|
9
|
-
private repositionCutoffs;
|
|
10
|
-
private repositionBorders;
|
|
11
|
-
private stackObjects;
|
|
12
|
-
private updateObjectDimensions;
|
|
13
|
-
constructor(canvas: IInteractiveCanvas);
|
|
14
|
-
/**
|
|
15
|
-
* @override
|
|
16
|
-
*/
|
|
17
|
-
onInit(): void;
|
|
18
|
-
/**
|
|
19
|
-
* @override
|
|
20
|
-
*/
|
|
21
|
-
onProfileChange(profile: ICanvasProfile): void;
|
|
22
|
-
/**
|
|
23
|
-
* @override
|
|
24
|
-
*/
|
|
25
|
-
onTextChange(): void;
|
|
26
|
-
/**
|
|
27
|
-
* @override
|
|
28
|
-
*/
|
|
29
|
-
onObjectListChange(): void;
|
|
30
|
-
/**
|
|
31
|
-
* @override
|
|
32
|
-
*/
|
|
33
|
-
onMarginChange(): void;
|
|
34
|
-
private stackAndRedraw;
|
|
35
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Canvas object with customizable background color.
|
|
3
|
-
*/
|
|
4
|
-
export interface IMutableBackgroundColor {
|
|
5
|
-
/**
|
|
6
|
-
* Get the background color.
|
|
7
|
-
*/
|
|
8
|
-
getBackgroundColor(): string;
|
|
9
|
-
/**
|
|
10
|
-
* Set the background color.
|
|
11
|
-
* @param color Color.
|
|
12
|
-
*/
|
|
13
|
-
setBackgroundColor(color: string): void;
|
|
14
|
-
}
|
|
15
|
-
export declare function isMutableBackgroundColor(object: any): object is IMutableBackgroundColor;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { ICanvasObject, IDimensionRestrictions } from "..";
|
|
3
|
-
/**
|
|
4
|
-
* Canvas field with a modifiable image.
|
|
5
|
-
*/
|
|
6
|
-
export interface IMutableImage extends ICanvasObject {
|
|
7
|
-
/**
|
|
8
|
-
* Get the image url.
|
|
9
|
-
*/
|
|
10
|
-
getImageUrl(): string;
|
|
11
|
-
/**
|
|
12
|
-
* Get an observable of the image url.
|
|
13
|
-
*/
|
|
14
|
-
getImageUrl$(): Observable<string>;
|
|
15
|
-
/**
|
|
16
|
-
* Set the image url.
|
|
17
|
-
* @param url New url.
|
|
18
|
-
*/
|
|
19
|
-
setImageUrl(url: string): void;
|
|
20
|
-
/**
|
|
21
|
-
* Sets the image width to x pixels.
|
|
22
|
-
* @param px Pixels.
|
|
23
|
-
* @param sizeRestrictions Restrictions on image size.
|
|
24
|
-
* @returns the new width in pixels
|
|
25
|
-
*/
|
|
26
|
-
setImageWidth(px: number, sizeRestrictions: IDimensionRestrictions): number;
|
|
27
|
-
}
|
|
28
|
-
export declare function isMutableImage(object: any): object is IMutableImage;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ICanvasObject } from "..";
|
|
2
|
-
export interface IMutablePosition extends ICanvasObject {
|
|
3
|
-
/**
|
|
4
|
-
* Center the object horizontally on the canvas.
|
|
5
|
-
*/
|
|
6
|
-
centerHorizontally(): void;
|
|
7
|
-
/**
|
|
8
|
-
* Center the object vertically on the canvas.
|
|
9
|
-
*/
|
|
10
|
-
centerVertically(): void;
|
|
11
|
-
/**
|
|
12
|
-
* Set the height of the element.
|
|
13
|
-
* @param height New height.
|
|
14
|
-
*/
|
|
15
|
-
setHeight(height: number): void;
|
|
16
|
-
/**
|
|
17
|
-
* Nudge the object upward.
|
|
18
|
-
*/
|
|
19
|
-
nudgeUp(): void;
|
|
20
|
-
/**
|
|
21
|
-
* Nudge the object downward.
|
|
22
|
-
*/
|
|
23
|
-
nudgeDown(): void;
|
|
24
|
-
/**
|
|
25
|
-
* Nudge the object leftward.
|
|
26
|
-
*/
|
|
27
|
-
nudgeLeft(): void;
|
|
28
|
-
/**
|
|
29
|
-
* Nudge the object rightward.
|
|
30
|
-
*/
|
|
31
|
-
nudgeRight(): void;
|
|
32
|
-
}
|
|
33
|
-
export declare function isMutablePosition(object: any): object is IMutablePosition;
|
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { IFont, TextAlignment } from "..";
|
|
3
|
-
import { IMutableText } from "./mutable-text.interface";
|
|
4
|
-
/**
|
|
5
|
-
* Canvas object with customizable text styling
|
|
6
|
-
*/
|
|
7
|
-
export interface IMutableTextStyle extends IMutableText {
|
|
8
|
-
/**
|
|
9
|
-
* Get the current text selection.
|
|
10
|
-
*/
|
|
11
|
-
getTextSelection(): ITextSelection;
|
|
12
|
-
/**
|
|
13
|
-
* Get an observable for the current {@link #getTextSelection text selection}.
|
|
14
|
-
*/
|
|
15
|
-
getTextSelection$(): Observable<ITextSelection>;
|
|
16
|
-
/**
|
|
17
|
-
* Set the text alignment.
|
|
18
|
-
* @param alignment New value.
|
|
19
|
-
*/
|
|
20
|
-
setTextAlign(alignment: TextAlignment): void;
|
|
21
|
-
/**
|
|
22
|
-
* Set the character spacing.
|
|
23
|
-
* @param spacing New value.
|
|
24
|
-
*/
|
|
25
|
-
setCharSpacing(spacing: number): void;
|
|
26
|
-
/**
|
|
27
|
-
* Set the line height.
|
|
28
|
-
* @param height New value.
|
|
29
|
-
*/
|
|
30
|
-
setLineHeight(height: number): void;
|
|
31
|
-
/**
|
|
32
|
-
* Set the bold state of the current selection.
|
|
33
|
-
* @param bold Bold state.
|
|
34
|
-
*/
|
|
35
|
-
setBold(bold?: boolean): void;
|
|
36
|
-
/**
|
|
37
|
-
* Set a specified region to bold.
|
|
38
|
-
* @param start region start index.
|
|
39
|
-
* @param end region end index.
|
|
40
|
-
* @param bold whether to set bold or not.
|
|
41
|
-
*/
|
|
42
|
-
setBoldRegion(start: number, end: number, bold?: boolean): void;
|
|
43
|
-
/**
|
|
44
|
-
* Set the italic state of the current selection.
|
|
45
|
-
* @param italic Italic state.
|
|
46
|
-
*/
|
|
47
|
-
setItalic(italic?: boolean): void;
|
|
48
|
-
/**
|
|
49
|
-
* Set a specified region to italic.
|
|
50
|
-
* @param start region start index.
|
|
51
|
-
* @param end region end index.
|
|
52
|
-
* @param italic whether to set italic or not.
|
|
53
|
-
*/
|
|
54
|
-
setItalicRegion(start: number, end: number, italic?: boolean): void;
|
|
55
|
-
/**
|
|
56
|
-
* Set the strikethrough state of the current selection.
|
|
57
|
-
* @param strikethrough Strikethrough state.
|
|
58
|
-
*/
|
|
59
|
-
setStrikethrough(strikethrough?: boolean): void;
|
|
60
|
-
/**
|
|
61
|
-
* Set the underline state of the current selection.
|
|
62
|
-
* @param underline Underline state.
|
|
63
|
-
*/
|
|
64
|
-
setUnderline(underline?: boolean): void;
|
|
65
|
-
/**
|
|
66
|
-
* Set the font.
|
|
67
|
-
* @param font New value.
|
|
68
|
-
*/
|
|
69
|
-
setFont(font: IFont): void;
|
|
70
|
-
/**
|
|
71
|
-
* Set the font size.
|
|
72
|
-
* @param fontSize New value.
|
|
73
|
-
*/
|
|
74
|
-
setFontSize(fontSize: number): void;
|
|
75
|
-
/**
|
|
76
|
-
* Set the text background color.
|
|
77
|
-
* @param color New value.
|
|
78
|
-
*/
|
|
79
|
-
setTextBackgroundColor(color: string): void;
|
|
80
|
-
}
|
|
81
|
-
export interface ITextSelection {
|
|
82
|
-
/**
|
|
83
|
-
* Index of selection start in characters.
|
|
84
|
-
*/
|
|
85
|
-
readonly start: number;
|
|
86
|
-
/**
|
|
87
|
-
* Index of selection end in characters.
|
|
88
|
-
*/
|
|
89
|
-
readonly end: number;
|
|
90
|
-
/**
|
|
91
|
-
* Selection length in characters.
|
|
92
|
-
*/
|
|
93
|
-
readonly length: number;
|
|
94
|
-
/**
|
|
95
|
-
* Selection start line index.
|
|
96
|
-
*/
|
|
97
|
-
readonly lineIndex: number;
|
|
98
|
-
/**
|
|
99
|
-
* Selection start character index (from start of current line).
|
|
100
|
-
*/
|
|
101
|
-
readonly charIndex: number;
|
|
102
|
-
/**
|
|
103
|
-
* Current font.
|
|
104
|
-
*/
|
|
105
|
-
readonly font: IFont;
|
|
106
|
-
/**
|
|
107
|
-
* Font size.
|
|
108
|
-
*/
|
|
109
|
-
readonly fontSize: number;
|
|
110
|
-
/**
|
|
111
|
-
* Font weight.
|
|
112
|
-
*/
|
|
113
|
-
readonly fontWeight: number;
|
|
114
|
-
/**
|
|
115
|
-
* Current text alignment.
|
|
116
|
-
*/
|
|
117
|
-
readonly textAlign: TextAlignment;
|
|
118
|
-
/**
|
|
119
|
-
* Current character spacing.
|
|
120
|
-
*/
|
|
121
|
-
readonly charSpacing: number;
|
|
122
|
-
/**
|
|
123
|
-
* Current line height.
|
|
124
|
-
*/
|
|
125
|
-
readonly lineHeight: number;
|
|
126
|
-
/**
|
|
127
|
-
* True if the current selection is bold.
|
|
128
|
-
*/
|
|
129
|
-
readonly bold: boolean;
|
|
130
|
-
/**
|
|
131
|
-
* True if the current selection is italic.
|
|
132
|
-
*/
|
|
133
|
-
readonly italic: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Whether the text has an underline.
|
|
136
|
-
*/
|
|
137
|
-
readonly underline: boolean;
|
|
138
|
-
/**
|
|
139
|
-
* Whether the text has a strikethrough.
|
|
140
|
-
*/
|
|
141
|
-
readonly strikethrough: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* Whether the text has an overline.
|
|
144
|
-
*/
|
|
145
|
-
readonly overline: boolean;
|
|
146
|
-
/**
|
|
147
|
-
* Fill color.
|
|
148
|
-
*/
|
|
149
|
-
readonly fill: string;
|
|
150
|
-
/**
|
|
151
|
-
* Stroke color.
|
|
152
|
-
*/
|
|
153
|
-
readonly stroke: string;
|
|
154
|
-
/**
|
|
155
|
-
* Stroke width.
|
|
156
|
-
*/
|
|
157
|
-
readonly strokeWidth: number;
|
|
158
|
-
/**
|
|
159
|
-
* Background color.
|
|
160
|
-
*/
|
|
161
|
-
readonly textBackgroundColor: string;
|
|
162
|
-
}
|
|
163
|
-
export declare function isMutableTextStyle(object: any): object is IMutableText;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Observable } from "rxjs";
|
|
2
|
-
import { ICanvasObject } from "..";
|
|
3
|
-
/**
|
|
4
|
-
* Because of the way styles are handled in fabric, stored as a separate list of character pointers and not inline as per HTML, modifying the text directly is dangerous - it will cause the
|
|
5
|
-
* location of the styles to become out of sync with the actual text if the length changes.
|
|
6
|
-
* Text modification should be performed by inserting the selection cursor at a given position and modifying the selection... this lets the canvas track changes and update the styles accordingly.
|
|
7
|
-
* It's pretty crap, honestly but text support is explicitly a second-class citizen in fabric, as the author has stated text support is out-of-scope for the library:
|
|
8
|
-
* https://github.com/fabricjs/fabric.js/issues/3443#issuecomment-262263542
|
|
9
|
-
*/
|
|
10
|
-
export interface IMutableText extends ICanvasObject {
|
|
11
|
-
getText(): string;
|
|
12
|
-
getText$(): Observable<string>;
|
|
13
|
-
/**
|
|
14
|
-
* Generally, don't use this. It will not modify the style locations, and if the text length changes, it will cause the
|
|
15
|
-
* styles to slide out of place.
|
|
16
|
-
* Use {@link IMutableText#replaceText} instead, where feasible.
|
|
17
|
-
* @param text New text.
|
|
18
|
-
* @see {@link IMutableText#replaceText}
|
|
19
|
-
*/
|
|
20
|
-
setText(text: string): void;
|
|
21
|
-
/**
|
|
22
|
-
* Replace a text fragment in the field. Honors existing styling as much as possible.
|
|
23
|
-
* @param target Existing text fragment.
|
|
24
|
-
* @param replacement Replacement fragment.
|
|
25
|
-
*/
|
|
26
|
-
replaceText(target: string, replacement: string): void;
|
|
27
|
-
/**
|
|
28
|
-
* Is the text bulleted?
|
|
29
|
-
*/
|
|
30
|
-
isBulleted(): boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Enable bullet points.
|
|
33
|
-
*/
|
|
34
|
-
enableBullets(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Disable bullet points.
|
|
37
|
-
*/
|
|
38
|
-
disableBullets(): void;
|
|
39
|
-
}
|
|
40
|
-
export declare function isMutableText(object: any): object is IMutableText;
|
|
@@ -1,155 +0,0 @@
|
|
|
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
|
-
/**
|
|
14
|
-
* Create a new instance.
|
|
15
|
-
* @param type Object type.
|
|
16
|
-
* @param canvas Interactive canvas that the field will be rendered on.
|
|
17
|
-
* @param fabricObject The fabric object to bind this field to.
|
|
18
|
-
* @param data Existing persisted field data to load from, if applicable.
|
|
19
|
-
*/
|
|
20
|
-
protected constructor(type: ObjectType, canvas: IInteractiveCanvas, fabricObject: any, data?: CanvasObjectData);
|
|
21
|
-
/**
|
|
22
|
-
* @override
|
|
23
|
-
* @inheritDoc
|
|
24
|
-
*/
|
|
25
|
-
getId(): string;
|
|
26
|
-
/**
|
|
27
|
-
* @override
|
|
28
|
-
* @inheritDoc
|
|
29
|
-
*/
|
|
30
|
-
getType(): ObjectType;
|
|
31
|
-
/**
|
|
32
|
-
* @override
|
|
33
|
-
* @inheritDoc
|
|
34
|
-
*/
|
|
35
|
-
getDescription(): string;
|
|
36
|
-
/**
|
|
37
|
-
* @override
|
|
38
|
-
* @inheritDoc
|
|
39
|
-
*/
|
|
40
|
-
setSortCaption(value: boolean): void;
|
|
41
|
-
/**
|
|
42
|
-
* @override
|
|
43
|
-
* @inheritDoc
|
|
44
|
-
*/
|
|
45
|
-
isSortCaption(): boolean;
|
|
46
|
-
/**
|
|
47
|
-
* @override
|
|
48
|
-
* @inheritDoc
|
|
49
|
-
*/
|
|
50
|
-
getDimensions(): IObjectDimensions;
|
|
51
|
-
/**
|
|
52
|
-
* @override
|
|
53
|
-
* @inheritDoc
|
|
54
|
-
*/
|
|
55
|
-
getDimensions$(): Observable<IObjectDimensions>;
|
|
56
|
-
/**
|
|
57
|
-
* @override
|
|
58
|
-
* @inheritDoc
|
|
59
|
-
*/
|
|
60
|
-
getMargin(): IMargin;
|
|
61
|
-
/**
|
|
62
|
-
* @override
|
|
63
|
-
* @inheritDoc
|
|
64
|
-
*/
|
|
65
|
-
setMargin(margin: IMargin): void;
|
|
66
|
-
/**
|
|
67
|
-
* @override
|
|
68
|
-
* @inheritDoc
|
|
69
|
-
*/
|
|
70
|
-
getColumnWidthPercent(): number;
|
|
71
|
-
/**
|
|
72
|
-
* @override
|
|
73
|
-
* @inheritDoc
|
|
74
|
-
*/
|
|
75
|
-
setColumnWidthPercent(percent: number): void;
|
|
76
|
-
/**
|
|
77
|
-
* @override
|
|
78
|
-
* @inheritDoc
|
|
79
|
-
*/
|
|
80
|
-
bringForward(): void;
|
|
81
|
-
/**
|
|
82
|
-
* @override
|
|
83
|
-
* @inheritDoc
|
|
84
|
-
*/
|
|
85
|
-
bringToFront(): void;
|
|
86
|
-
/**
|
|
87
|
-
* @override
|
|
88
|
-
* @inheritDoc
|
|
89
|
-
*/
|
|
90
|
-
sendBackward(): void;
|
|
91
|
-
/**
|
|
92
|
-
* @override
|
|
93
|
-
* @inheritDoc
|
|
94
|
-
*/
|
|
95
|
-
sendToBack(): void;
|
|
96
|
-
/**
|
|
97
|
-
* @override
|
|
98
|
-
* @inheritDoc
|
|
99
|
-
*/
|
|
100
|
-
moveUp(): void;
|
|
101
|
-
/**
|
|
102
|
-
* @override
|
|
103
|
-
* @inheritDoc
|
|
104
|
-
*/
|
|
105
|
-
moveDown(): void;
|
|
106
|
-
/**
|
|
107
|
-
* @override
|
|
108
|
-
* @inheritDoc
|
|
109
|
-
*/
|
|
110
|
-
delete(): void;
|
|
111
|
-
/**
|
|
112
|
-
* @override
|
|
113
|
-
* @inheritDoc
|
|
114
|
-
*/
|
|
115
|
-
persist(): CanvasObjectData;
|
|
116
|
-
/**
|
|
117
|
-
* @override
|
|
118
|
-
* @inheritDoc
|
|
119
|
-
*/
|
|
120
|
-
isPinToBottom(): boolean;
|
|
121
|
-
/**
|
|
122
|
-
* @override
|
|
123
|
-
* @inheritDoc
|
|
124
|
-
*/
|
|
125
|
-
setPinToBottom(value?: boolean): void;
|
|
126
|
-
/**
|
|
127
|
-
* Get the underlying fabric object.
|
|
128
|
-
* (Internal use only, do not expose this outside the canvas module).
|
|
129
|
-
*/
|
|
130
|
-
getFabricObjectInternal(): T;
|
|
131
|
-
setPosition(position: IPosition): void;
|
|
132
|
-
setCoords(): void;
|
|
133
|
-
updateDimensions(): void;
|
|
134
|
-
getBoundingBox(): {
|
|
135
|
-
top: number;
|
|
136
|
-
left: number;
|
|
137
|
-
width: number;
|
|
138
|
-
height: number;
|
|
139
|
-
};
|
|
140
|
-
moveToPinnedPosition(): void;
|
|
141
|
-
protected updatePinToBottomDistance(): void;
|
|
142
|
-
protected redraw(): void;
|
|
143
|
-
protected onProfileChange(profile: ICanvasProfile): void;
|
|
144
|
-
protected onLayoutManagerChange(layoutManager: ILayoutManager): void;
|
|
145
|
-
protected onMove(event: any): void;
|
|
146
|
-
protected onRotate(event: any): void;
|
|
147
|
-
protected onScale(event: any): void;
|
|
148
|
-
protected onDelete(): void;
|
|
149
|
-
protected preventLeavingCanvas(): void;
|
|
150
|
-
protected getCanvasOverflow(): IOverflow;
|
|
151
|
-
protected centerHorizontallyInternal(): void;
|
|
152
|
-
protected centerVerticallyInternal(): void;
|
|
153
|
-
protected nudgeInternal(x?: number, y?: number): void;
|
|
154
|
-
protected updateFabricObjectBehavior(): void;
|
|
155
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IMargin, 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
|
-
editable?: boolean;
|
|
15
|
-
prefillType: string;
|
|
16
|
-
sortCaption?: boolean;
|
|
17
|
-
resizeCanvas: boolean;
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
userText?: string;
|
|
20
|
-
bulleted?: boolean;
|
|
21
|
-
imagePath?: string;
|
|
22
|
-
constructor(type: ObjectType, id: string);
|
|
23
|
-
}
|