@leapfrog/interactive-canvas 2.0.24-beta-6 → 2.0.24-beta-8
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.
|
@@ -3066,7 +3066,9 @@ class AbstractInteractiveCanvas {
|
|
|
3066
3066
|
},
|
|
3067
3067
|
});
|
|
3068
3068
|
this.fabricCanvas.add(fabricImage);
|
|
3069
|
-
const
|
|
3069
|
+
const canvasObjectData = new CanvasObjectData(ObjectType.IMAGE, id);
|
|
3070
|
+
canvasObjectData.imagePath = imageUrl;
|
|
3071
|
+
const object = new Image(this, fabricImage, canvasObjectData);
|
|
3070
3072
|
this.trackNewObject(object);
|
|
3071
3073
|
this.syncObjectList();
|
|
3072
3074
|
return object;
|
|
@@ -3582,7 +3584,12 @@ class AbstractInteractiveCanvas {
|
|
|
3582
3584
|
}
|
|
3583
3585
|
syncObjectList() {
|
|
3584
3586
|
const newObjectList = _(this.fabricCanvas.getObjects())
|
|
3585
|
-
.map((obj) =>
|
|
3587
|
+
.map((obj) => {
|
|
3588
|
+
if (obj.type === "textbox") {
|
|
3589
|
+
obj.splitByGrapheme = true;
|
|
3590
|
+
}
|
|
3591
|
+
return this.findObject(obj.id);
|
|
3592
|
+
})
|
|
3586
3593
|
.filter((x) => x !== undefined)
|
|
3587
3594
|
.value();
|
|
3588
3595
|
this.objects$.next(newObjectList);
|
|
@@ -3087,7 +3087,9 @@ class AbstractInteractiveCanvas {
|
|
|
3087
3087
|
},
|
|
3088
3088
|
});
|
|
3089
3089
|
this.fabricCanvas.add(fabricImage);
|
|
3090
|
-
const
|
|
3090
|
+
const canvasObjectData = new CanvasObjectData(exports.ObjectType.IMAGE, id);
|
|
3091
|
+
canvasObjectData.imagePath = imageUrl;
|
|
3092
|
+
const object = new Image(this, fabricImage, canvasObjectData);
|
|
3091
3093
|
this.trackNewObject(object);
|
|
3092
3094
|
this.syncObjectList();
|
|
3093
3095
|
return object;
|
|
@@ -3603,7 +3605,12 @@ class AbstractInteractiveCanvas {
|
|
|
3603
3605
|
}
|
|
3604
3606
|
syncObjectList() {
|
|
3605
3607
|
const newObjectList = _(this.fabricCanvas.getObjects())
|
|
3606
|
-
.map((obj) =>
|
|
3608
|
+
.map((obj) => {
|
|
3609
|
+
if (obj.type === "textbox") {
|
|
3610
|
+
obj.splitByGrapheme = true;
|
|
3611
|
+
}
|
|
3612
|
+
return this.findObject(obj.id);
|
|
3613
|
+
})
|
|
3607
3614
|
.filter((x) => x !== undefined)
|
|
3608
3615
|
.value();
|
|
3609
3616
|
this.objects$.next(newObjectList);
|