canvas-editor-engine 2.1.14 → 2.1.15
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 +10 -10
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1072,10 +1072,10 @@ var Filter = function() {
|
|
|
1072
1072
|
Filter.prototype.getSizeOfSparseMatrix = function(RGBAMatrix, tempSize) {
|
|
1073
1073
|
var leftIndex;
|
|
1074
1074
|
var upIndex;
|
|
1075
|
-
for (var
|
|
1076
|
-
var
|
|
1077
|
-
for (var
|
|
1078
|
-
var
|
|
1075
|
+
for (var iy = 0; iy < RGBAMatrix.length; iy++) {
|
|
1076
|
+
var row = RGBAMatrix[iy];
|
|
1077
|
+
for (var ix = 0; ix < row.length; ix++) {
|
|
1078
|
+
var rowItem = row[ix];
|
|
1079
1079
|
var isNotEmpty = rowItem[3] !== 0;
|
|
1080
1080
|
if (isNotEmpty) {
|
|
1081
1081
|
leftIndex = ix;
|
|
@@ -1089,14 +1089,14 @@ var Filter = function() {
|
|
|
1089
1089
|
}
|
|
1090
1090
|
var rightIndex;
|
|
1091
1091
|
var downIndex;
|
|
1092
|
-
for (var
|
|
1093
|
-
var
|
|
1094
|
-
for (var
|
|
1095
|
-
var
|
|
1092
|
+
for (var iy = RGBAMatrix.length - 1; iy >= 0; iy--) {
|
|
1093
|
+
var row = RGBAMatrix[iy];
|
|
1094
|
+
for (var ix = row.length - 1; ix >= 0; ix--) {
|
|
1095
|
+
var rowItem = row[ix];
|
|
1096
1096
|
var isNotEmpty = rowItem[3] !== 0;
|
|
1097
1097
|
if (isNotEmpty) {
|
|
1098
|
-
rightIndex = ix;
|
|
1099
|
-
downIndex = iy;
|
|
1098
|
+
rightIndex = row.length - 1 - ix;
|
|
1099
|
+
downIndex = RGBAMatrix.length - 1 - iy;
|
|
1100
1100
|
break;
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|