canvas-editor-engine 2.1.14 → 2.1.16

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.
Files changed (2) hide show
  1. package/dist/index.mjs +10 -16
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -401,7 +401,6 @@ var ExcretionsComponent = function(_super) {
401
401
  }
402
402
  };
403
403
  ExcretionsComponent.prototype.clearExcretionsCoords = function() {
404
- console.log("clear!");
405
404
  this._excretions.forEach((function(excretion) {
406
405
  return excretion.remove();
407
406
  }));
@@ -419,7 +418,6 @@ var ExcretionsComponent = function(_super) {
419
418
  var coords = this.getTempCoords();
420
419
  this.excretionsCoords.push(coords);
421
420
  this._excretionActivity = "end";
422
- console.log("this.excretionsCoords", this.excretionsCoords);
423
421
  };
424
422
  ExcretionsComponent.prototype.emmit = function() {
425
423
  var _this = this;
@@ -674,7 +672,6 @@ var PipetteComponent = function(_super) {
674
672
  this.canvasComponent.subscribe("click", (function(event, cursorPosition) {
675
673
  var state = _this._pipetteState;
676
674
  if (state === "taken" || state === "selected-color") {
677
- console.log("pipetteState", state);
678
675
  if (state === "taken") {
679
676
  _this.setColorFromChoosenPixel(cursorPosition);
680
677
  _this.setState("selected-color");
@@ -1063,7 +1060,6 @@ var Filter = function() {
1063
1060
  clearedBuff.forEach((function(_, i) {
1064
1061
  return tempImageData.data[i] = clearedBuff[i];
1065
1062
  }));
1066
- console.log("cleared", cleared);
1067
1063
  return {
1068
1064
  imageData: tempImageData,
1069
1065
  size: tempSize
@@ -1072,10 +1068,10 @@ var Filter = function() {
1072
1068
  Filter.prototype.getSizeOfSparseMatrix = function(RGBAMatrix, tempSize) {
1073
1069
  var leftIndex;
1074
1070
  var upIndex;
1075
- for (var _i = 0, _a = RGBAMatrix.entries(); _i < _a.length; _i++) {
1076
- var _b = _a[_i], iy = _b[0], row = _b[1];
1077
- for (var _c = 0, _d = row.entries(); _c < _d.length; _c++) {
1078
- var _e = _d[_c], ix = _e[0], rowItem = _e[1];
1071
+ for (var iy = 0; iy < RGBAMatrix.length; iy++) {
1072
+ var row = RGBAMatrix[iy];
1073
+ for (var ix = 0; ix < row.length; ix++) {
1074
+ var rowItem = row[ix];
1079
1075
  var isNotEmpty = rowItem[3] !== 0;
1080
1076
  if (isNotEmpty) {
1081
1077
  leftIndex = ix;
@@ -1089,14 +1085,14 @@ var Filter = function() {
1089
1085
  }
1090
1086
  var rightIndex;
1091
1087
  var downIndex;
1092
- for (var _f = 0, _g = RGBAMatrix.reverse().entries(); _f < _g.length; _f++) {
1093
- var _h = _g[_f], iy = _h[0], row = _h[1];
1094
- for (var _j = 0, _k = row.reverse().entries(); _j < _k.length; _j++) {
1095
- var _l = _k[_j], ix = _l[0], rowItem = _l[1];
1088
+ for (var iy = RGBAMatrix.length - 1; iy >= 0; iy--) {
1089
+ var row = RGBAMatrix[iy];
1090
+ for (var ix = row.length - 1; ix >= 0; ix--) {
1091
+ var rowItem = row[ix];
1096
1092
  var isNotEmpty = rowItem[3] !== 0;
1097
1093
  if (isNotEmpty) {
1098
- rightIndex = ix;
1099
- downIndex = iy;
1094
+ rightIndex = row.length - 1 - ix;
1095
+ downIndex = RGBAMatrix.length - 1 - iy;
1100
1096
  break;
1101
1097
  }
1102
1098
  }
@@ -1765,13 +1761,11 @@ var VagueFilter = function(_super) {
1765
1761
  };
1766
1762
  VagueFilter.prototype.pixel = function(imageData, filterOptions) {
1767
1763
  var quality = filterOptions.quality;
1768
- console.log("quality", quality);
1769
1764
  var processedImageData = this.getQualityProcessedRemainder(imageData, +quality);
1770
1765
  var imageSize = {
1771
1766
  width: processedImageData.width,
1772
1767
  height: processedImageData.height
1773
1768
  };
1774
- console.log("imageSize", imageSize);
1775
1769
  this.setImageSize(imageSize);
1776
1770
  var _a = this.getBuffCollection(processedImageData), rowRGBABuff = _a.rowRGBABuff, buff = _a.buff;
1777
1771
  var _b = this.getQualityBuff(buff, +quality), qualityBuff = _b.qualityBuff, rangeCommit = _b.rangeCommit;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "canvas-editor-engine",
3
- "version": "2.1.14",
3
+ "version": "2.1.16",
4
4
  "description": "CanvasEditorEngine library, use: [typescript] [canvas]",
5
5
  "main": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",