canvas-editor-engine 2.2.3 → 2.2.4
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/index.mjs +7 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1416,8 +1416,13 @@ var Reducer$1 = function() {
|
|
1416
1416
|
Reducer.prototype.updateLayer = function(payload) {
|
1417
1417
|
var isUpdate = false;
|
1418
1418
|
if (!!payload) {
|
1419
|
-
this.state._layers.
|
1420
|
-
|
1419
|
+
var targetLayerIndex = this.state._layers.findIndex((function(layer) {
|
1420
|
+
return layer.id === payload.id;
|
1421
|
+
}));
|
1422
|
+
if (targetLayerIndex != -1) {
|
1423
|
+
this.state._layers[targetLayerIndex] = payload;
|
1424
|
+
isUpdate = true;
|
1425
|
+
}
|
1421
1426
|
}
|
1422
1427
|
if (isUpdate && !!this.state._emergeCompleteIt) {
|
1423
1428
|
this.state._emergeCompleteIt(this.state._layers);
|