@leapfrog/interactive-canvas 2.0.15 → 2.0.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/abstract-interactive-canvas.d.ts +375 -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 +3855 -3864
- package/dist/interactive-canvas.interface.d.ts +297 -297
- package/dist/interactive-canvas.js +3855 -3868
- 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 +322 -322
- 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 +28 -28
- 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,17 +1,17 @@
|
|
|
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
|
+
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,16 +1,16 @@
|
|
|
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 repositionBackgrounds;
|
|
11
|
-
private resizeCanvas;
|
|
12
|
-
constructor(canvas: IInteractiveCanvas);
|
|
13
|
-
onCanvasDimensionsChange(): void;
|
|
14
|
-
onTextChange(): void;
|
|
15
|
-
onObjectListChange(): void;
|
|
16
|
-
}
|
|
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 repositionBackgrounds;
|
|
11
|
+
private resizeCanvas;
|
|
12
|
+
constructor(canvas: IInteractiveCanvas);
|
|
13
|
+
onCanvasDimensionsChange(): void;
|
|
14
|
+
onTextChange(): void;
|
|
15
|
+
onObjectListChange(): void;
|
|
16
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../../interactive-canvas.interface";
|
|
2
|
-
export declare class PinToBottomLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
}
|
|
1
|
+
import { IInteractiveCanvas } from "../../interactive-canvas.interface";
|
|
2
|
+
export declare class PinToBottomLayoutFunction {
|
|
3
|
+
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../../interactive-canvas.interface";
|
|
2
|
-
export declare class RedrawAllLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
}
|
|
1
|
+
import { IInteractiveCanvas } from "../../interactive-canvas.interface";
|
|
2
|
+
export declare class RedrawAllLayoutFunction {
|
|
3
|
+
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../..";
|
|
2
|
-
export declare class RepositionBackgroundsLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
}
|
|
1
|
+
import { IInteractiveCanvas } from "../..";
|
|
2
|
+
export declare class RepositionBackgroundsLayoutFunction {
|
|
3
|
+
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../..";
|
|
2
|
-
export declare class RepositionBordersLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
}
|
|
1
|
+
import { IInteractiveCanvas } from "../..";
|
|
2
|
+
export declare class RepositionBordersLayoutFunction {
|
|
3
|
+
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../..";
|
|
2
|
-
export declare class RepositionCutoffsLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
}
|
|
1
|
+
import { IInteractiveCanvas } from "../..";
|
|
2
|
+
export declare class RepositionCutoffsLayoutFunction {
|
|
3
|
+
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../..";
|
|
2
|
-
export declare class ResizeCanvasLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
}
|
|
1
|
+
import { IInteractiveCanvas } from "../..";
|
|
2
|
+
export declare class ResizeCanvasLayoutFunction {
|
|
3
|
+
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
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
|
+
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,4 +1,4 @@
|
|
|
1
|
-
import { IInteractiveCanvas } from "../../interactive-canvas.interface";
|
|
2
|
-
export declare class UpdateObjectDimensionsLayoutFunction {
|
|
3
|
-
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
-
}
|
|
1
|
+
import { IInteractiveCanvas } from "../../interactive-canvas.interface";
|
|
2
|
+
export declare class UpdateObjectDimensionsLayoutFunction {
|
|
3
|
+
execute(canvas: IInteractiveCanvas): void;
|
|
4
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare enum LayoutManager {
|
|
2
|
-
LEGACY = "LEGACY",
|
|
3
|
-
STANDARD = "STANDARD",
|
|
4
|
-
ADVANCED = "ADVANCED"
|
|
5
|
-
}
|
|
1
|
+
export declare enum LayoutManager {
|
|
2
|
+
LEGACY = "LEGACY",
|
|
3
|
+
STANDARD = "STANDARD",
|
|
4
|
+
ADVANCED = "ADVANCED"
|
|
5
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
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
|
+
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,40 +1,40 @@
|
|
|
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 repositionBackgrounds;
|
|
12
|
-
private stackObjects;
|
|
13
|
-
private updateObjectDimensions;
|
|
14
|
-
constructor(canvas: IInteractiveCanvas);
|
|
15
|
-
/**
|
|
16
|
-
* @override
|
|
17
|
-
*/
|
|
18
|
-
onInit(): void;
|
|
19
|
-
/**
|
|
20
|
-
* @override
|
|
21
|
-
*/
|
|
22
|
-
onProfileChange(profile: ICanvasProfile): void;
|
|
23
|
-
/**
|
|
24
|
-
* @override
|
|
25
|
-
*/
|
|
26
|
-
onCanvasDimensionsChange(): void;
|
|
27
|
-
/**
|
|
28
|
-
* @override
|
|
29
|
-
*/
|
|
30
|
-
onTextChange(): void;
|
|
31
|
-
/**
|
|
32
|
-
* @override
|
|
33
|
-
*/
|
|
34
|
-
onObjectListChange(): void;
|
|
35
|
-
/**
|
|
36
|
-
* @override
|
|
37
|
-
*/
|
|
38
|
-
onMarginChange(): void;
|
|
39
|
-
private stackAndRedraw;
|
|
40
|
-
}
|
|
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 repositionBackgrounds;
|
|
12
|
+
private stackObjects;
|
|
13
|
+
private updateObjectDimensions;
|
|
14
|
+
constructor(canvas: IInteractiveCanvas);
|
|
15
|
+
/**
|
|
16
|
+
* @override
|
|
17
|
+
*/
|
|
18
|
+
onInit(): void;
|
|
19
|
+
/**
|
|
20
|
+
* @override
|
|
21
|
+
*/
|
|
22
|
+
onProfileChange(profile: ICanvasProfile): void;
|
|
23
|
+
/**
|
|
24
|
+
* @override
|
|
25
|
+
*/
|
|
26
|
+
onCanvasDimensionsChange(): void;
|
|
27
|
+
/**
|
|
28
|
+
* @override
|
|
29
|
+
*/
|
|
30
|
+
onTextChange(): void;
|
|
31
|
+
/**
|
|
32
|
+
* @override
|
|
33
|
+
*/
|
|
34
|
+
onObjectListChange(): void;
|
|
35
|
+
/**
|
|
36
|
+
* @override
|
|
37
|
+
*/
|
|
38
|
+
onMarginChange(): void;
|
|
39
|
+
private stackAndRedraw;
|
|
40
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
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
|
+
/**
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import { ICanvasObject } from "..";
|
|
2
|
-
export interface IMutableColor extends ICanvasObject {
|
|
3
|
-
getColor(): string | null;
|
|
4
|
-
setColor(color: string | null): void;
|
|
5
|
-
}
|
|
6
|
-
export declare function isMutableColor(object: any): object is IMutableColor;
|
|
1
|
+
import { ICanvasObject } from "..";
|
|
2
|
+
export interface IMutableColor extends ICanvasObject {
|
|
3
|
+
getColor(): string | null;
|
|
4
|
+
setColor(color: string | null): void;
|
|
5
|
+
}
|
|
6
|
+
export declare function isMutableColor(object: any): object is IMutableColor;
|
|
@@ -1,28 +1,28 @@
|
|
|
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): Promise<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
|
+
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): Promise<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,63 +1,63 @@
|
|
|
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 left value of the element.
|
|
13
|
-
* @param left New left value.
|
|
14
|
-
*/
|
|
15
|
-
setLeft(left: number): void;
|
|
16
|
-
/**
|
|
17
|
-
* Set the top value of the element.
|
|
18
|
-
* @param top New top value.
|
|
19
|
-
*/
|
|
20
|
-
setTop(top: number): void;
|
|
21
|
-
/**
|
|
22
|
-
* Set the height of the element.
|
|
23
|
-
* @param height New height.
|
|
24
|
-
*/
|
|
25
|
-
setHeight(height: number): void;
|
|
26
|
-
/**
|
|
27
|
-
* Set the width of the element.
|
|
28
|
-
* @param width New width.
|
|
29
|
-
*/
|
|
30
|
-
setWidth(width: number): void;
|
|
31
|
-
/**
|
|
32
|
-
* Set the angle of the element.
|
|
33
|
-
* @param angle New angle.
|
|
34
|
-
*/
|
|
35
|
-
setAngle(angle: number): void;
|
|
36
|
-
/**
|
|
37
|
-
* Set the x scale of the element.
|
|
38
|
-
* @param scale New scale.
|
|
39
|
-
*/
|
|
40
|
-
setScaleX(scale: number): void;
|
|
41
|
-
/**
|
|
42
|
-
* Set the y scale of the element.
|
|
43
|
-
* @param scale New scale.
|
|
44
|
-
*/
|
|
45
|
-
setScaleY(scale: number): void;
|
|
46
|
-
/**
|
|
47
|
-
* Nudge the object upward.
|
|
48
|
-
*/
|
|
49
|
-
nudgeUp(): void;
|
|
50
|
-
/**
|
|
51
|
-
* Nudge the object downward.
|
|
52
|
-
*/
|
|
53
|
-
nudgeDown(): void;
|
|
54
|
-
/**
|
|
55
|
-
* Nudge the object leftward.
|
|
56
|
-
*/
|
|
57
|
-
nudgeLeft(): void;
|
|
58
|
-
/**
|
|
59
|
-
* Nudge the object rightward.
|
|
60
|
-
*/
|
|
61
|
-
nudgeRight(): void;
|
|
62
|
-
}
|
|
63
|
-
export declare function isMutablePosition(object: any): object is IMutablePosition;
|
|
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 left value of the element.
|
|
13
|
+
* @param left New left value.
|
|
14
|
+
*/
|
|
15
|
+
setLeft(left: number): void;
|
|
16
|
+
/**
|
|
17
|
+
* Set the top value of the element.
|
|
18
|
+
* @param top New top value.
|
|
19
|
+
*/
|
|
20
|
+
setTop(top: number): void;
|
|
21
|
+
/**
|
|
22
|
+
* Set the height of the element.
|
|
23
|
+
* @param height New height.
|
|
24
|
+
*/
|
|
25
|
+
setHeight(height: number): void;
|
|
26
|
+
/**
|
|
27
|
+
* Set the width of the element.
|
|
28
|
+
* @param width New width.
|
|
29
|
+
*/
|
|
30
|
+
setWidth(width: number): void;
|
|
31
|
+
/**
|
|
32
|
+
* Set the angle of the element.
|
|
33
|
+
* @param angle New angle.
|
|
34
|
+
*/
|
|
35
|
+
setAngle(angle: number): void;
|
|
36
|
+
/**
|
|
37
|
+
* Set the x scale of the element.
|
|
38
|
+
* @param scale New scale.
|
|
39
|
+
*/
|
|
40
|
+
setScaleX(scale: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* Set the y scale of the element.
|
|
43
|
+
* @param scale New scale.
|
|
44
|
+
*/
|
|
45
|
+
setScaleY(scale: number): void;
|
|
46
|
+
/**
|
|
47
|
+
* Nudge the object upward.
|
|
48
|
+
*/
|
|
49
|
+
nudgeUp(): void;
|
|
50
|
+
/**
|
|
51
|
+
* Nudge the object downward.
|
|
52
|
+
*/
|
|
53
|
+
nudgeDown(): void;
|
|
54
|
+
/**
|
|
55
|
+
* Nudge the object leftward.
|
|
56
|
+
*/
|
|
57
|
+
nudgeLeft(): void;
|
|
58
|
+
/**
|
|
59
|
+
* Nudge the object rightward.
|
|
60
|
+
*/
|
|
61
|
+
nudgeRight(): void;
|
|
62
|
+
}
|
|
63
|
+
export declare function isMutablePosition(object: any): object is IMutablePosition;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ICanvasObject } from "..";
|
|
2
|
-
export interface IMutableStroke extends ICanvasObject {
|
|
3
|
-
getStrokeColor(): string | null;
|
|
4
|
-
setStrokeColor(color: string | null): void;
|
|
5
|
-
getStrokeWidth(): number;
|
|
6
|
-
setStrokeWidth(width: number): void;
|
|
7
|
-
}
|
|
8
|
-
export declare function isMutableStroke(object: any): object is IMutableStroke;
|
|
1
|
+
import { ICanvasObject } from "..";
|
|
2
|
+
export interface IMutableStroke extends ICanvasObject {
|
|
3
|
+
getStrokeColor(): string | null;
|
|
4
|
+
setStrokeColor(color: string | null): void;
|
|
5
|
+
getStrokeWidth(): number;
|
|
6
|
+
setStrokeWidth(width: number): void;
|
|
7
|
+
}
|
|
8
|
+
export declare function isMutableStroke(object: any): object is IMutableStroke;
|