@leapfrog/interactive-canvas 2.0.19 → 2.0.20-beta-1
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/ErrorOptions.interface.d.ts +3 -0
- package/dist/abstract-interactive-canvas.d.ts +26 -7
- package/dist/headless-interactive-canvas.d.ts +2 -2
- package/dist/interactive-canvas.d.ts +1 -1
- package/dist/interactive-canvas.es.js +1747 -1944
- package/dist/interactive-canvas.interface.d.ts +22 -2
- package/dist/interactive-canvas.js +1769 -1953
- package/dist/object/abstract-canvas-object.d.ts +2 -2
- package/dist/object/impl/background-image.d.ts +3 -3
- package/dist/object/impl/border.d.ts +3 -3
- package/dist/object/impl/cutoff.d.ts +1 -1
- package/dist/object/impl/extended-fabric-object.interface.d.ts +2 -2
- package/dist/object/impl/extended-fabric-textbox.interface.d.ts +3 -2
- package/dist/object/impl/horizontal-rule.d.ts +1 -1
- package/dist/object/impl/image.d.ts +3 -3
- package/dist/object/impl/rectangle.d.ts +3 -3
- package/dist/object/impl/rich-text.d.ts +2 -2
- package/dist/object/impl/text.d.ts +1 -1
- package/dist/object/impl/vertical-rule.d.ts +1 -1
- package/dist/types/selection-data.interface.d.ts +3 -3
- package/dist/undo-stack.d.ts +1 -1
- package/package.json +11 -9
|
@@ -20,13 +20,12 @@ import { ICanvasObject } from "./object/canvas-object.interface";
|
|
|
20
20
|
import { ISelectionData } from "./types/selection-data.interface";
|
|
21
21
|
import { ICanvasState } from "./types/canvas-state.interface";
|
|
22
22
|
import { ITextSelection } from "./mutator/mutable-text-style.interface";
|
|
23
|
-
import {
|
|
23
|
+
import { TEvent, FabricObject, Canvas } from "fabric";
|
|
24
24
|
import { IRichText } from "./object/impl/rich-text";
|
|
25
25
|
import { IBackgroundImage } from "./object/impl/background-image";
|
|
26
|
-
import { IEvent } from "fabric/fabric-impl";
|
|
27
26
|
export declare abstract class AbstractInteractiveCanvas implements IInteractiveCanvas {
|
|
28
27
|
fabric: any;
|
|
29
|
-
protected readonly fabricCanvas:
|
|
28
|
+
protected readonly fabricCanvas: Canvas;
|
|
30
29
|
protected devicePixelRatio: number;
|
|
31
30
|
protected readonly IMAGE_CAPTURE_COEFFICIENT: number;
|
|
32
31
|
abstract readonly headless: boolean;
|
|
@@ -41,7 +40,7 @@ export declare abstract class AbstractInteractiveCanvas implements IInteractiveC
|
|
|
41
40
|
protected readonly objects$: BehaviorSubject<Array<AbstractCanvasObject<any>>>;
|
|
42
41
|
protected readonly selection$: BehaviorSubject<SelectionData>;
|
|
43
42
|
protected baseDimensions: ICanvasDimensions;
|
|
44
|
-
protected constructor(fabric: any, fabricCanvas:
|
|
43
|
+
protected constructor(fabric: any, fabricCanvas: Canvas, devicePixelRatio: number);
|
|
45
44
|
/**
|
|
46
45
|
* @override
|
|
47
46
|
* @inheritDoc
|
|
@@ -182,6 +181,26 @@ export declare abstract class AbstractInteractiveCanvas implements IInteractiveC
|
|
|
182
181
|
* @inheritDoc
|
|
183
182
|
*/
|
|
184
183
|
removeObject(target: ICanvasObject): void;
|
|
184
|
+
/**
|
|
185
|
+
* @override
|
|
186
|
+
* @inheritDoc
|
|
187
|
+
*/
|
|
188
|
+
bringObjectToFront(target: FabricObject): void;
|
|
189
|
+
/**
|
|
190
|
+
* @override
|
|
191
|
+
* @inheritDoc
|
|
192
|
+
*/
|
|
193
|
+
bringObjectForward(target: FabricObject): void;
|
|
194
|
+
/**
|
|
195
|
+
* @override
|
|
196
|
+
* @inheritDoc
|
|
197
|
+
*/
|
|
198
|
+
sendObjectBackwards(target: FabricObject): void;
|
|
199
|
+
/**
|
|
200
|
+
* @override
|
|
201
|
+
* @inheritDoc
|
|
202
|
+
*/
|
|
203
|
+
sendObjectToBack(target: FabricObject): void;
|
|
185
204
|
/**
|
|
186
205
|
* @override
|
|
187
206
|
* @inheritDoc
|
|
@@ -336,7 +355,7 @@ export declare abstract class AbstractInteractiveCanvas implements IInteractiveC
|
|
|
336
355
|
*/
|
|
337
356
|
notifyMarginChanged(): void;
|
|
338
357
|
removeFabricObject(obj: any): void;
|
|
339
|
-
protected selectFabricObject(object:
|
|
358
|
+
protected selectFabricObject(object: FabricObject): void;
|
|
340
359
|
protected onTextChange(): void;
|
|
341
360
|
protected onObjectListChange(): void;
|
|
342
361
|
protected onDimensionsChange(): void;
|
|
@@ -369,7 +388,7 @@ export declare class SelectionData implements ISelectionData {
|
|
|
369
388
|
readonly objects: Array<AbstractCanvasObject<any>>;
|
|
370
389
|
readonly isText: boolean;
|
|
371
390
|
readonly textSelection: ITextSelection | null;
|
|
372
|
-
event:
|
|
391
|
+
event: TEvent<MouseEvent>;
|
|
373
392
|
constructor(objects: Array<AbstractCanvasObject<any>>);
|
|
374
|
-
setEvent(event:
|
|
393
|
+
setEvent(event: TEvent<MouseEvent>): void;
|
|
375
394
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { fabric } from "fabric";
|
|
2
1
|
import { AbstractInteractiveCanvas } from "./abstract-interactive-canvas";
|
|
2
|
+
import { FabricObject } from "fabric";
|
|
3
3
|
export declare class HeadlessInteractiveCanvas extends AbstractInteractiveCanvas {
|
|
4
4
|
readonly headless: boolean;
|
|
5
5
|
constructor();
|
|
6
6
|
/**
|
|
7
7
|
* @override
|
|
8
8
|
*/
|
|
9
|
-
protected selectFabricObject(object:
|
|
9
|
+
protected selectFabricObject(object: FabricObject): void;
|
|
10
10
|
}
|
|
@@ -3,7 +3,7 @@ export declare class InteractiveCanvas extends AbstractInteractiveCanvas {
|
|
|
3
3
|
protected devicePixelRatio: number;
|
|
4
4
|
readonly headless: boolean;
|
|
5
5
|
private readonly undoStack;
|
|
6
|
-
constructor(canvas: HTMLCanvasElement | string |
|
|
6
|
+
constructor(canvas: HTMLCanvasElement | string | undefined, devicePixelRatio: number);
|
|
7
7
|
/**
|
|
8
8
|
* @override
|
|
9
9
|
* @inheritDoc
|