customized-fabric 1.5.7 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
@@ -122,7 +122,12 @@ const ImagePlaceholderClass = fabric_1.fabric.util.createClass(fabric_1.fabric.G
|
|
122
122
|
const canvas = this?.canvas;
|
123
123
|
canvas?.remove(this.uploadedImage);
|
124
124
|
this.uploadedImage = loadedImage;
|
125
|
-
canvas
|
125
|
+
const index = canvas
|
126
|
+
?.getObjects()
|
127
|
+
?.findIndex((obj) => obj._id == this._id);
|
128
|
+
if (index >= 0) {
|
129
|
+
canvas.insertAt(loadedImage, index, false);
|
130
|
+
}
|
126
131
|
this.fitImage(this.uploadedImage);
|
127
132
|
this.applyImageFilters(this.uploadedImage);
|
128
133
|
canvas?.renderAll();
|