@syncfusion/ej2-image-editor 27.1.51 → 27.1.52

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.
@@ -3033,12 +3033,7 @@ var Draw = /** @__PURE__ @class */ (function () {
3033
3033
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
3034
3034
  var coll = actObj.rotateFlipColl[i];
3035
3035
  if (typeof (coll) === 'number') {
3036
- if (actObj.shapeDegree === 0) {
3037
- tempDegree = coll;
3038
- }
3039
- else {
3040
- tempDegree = coll - actObj.shapeDegree;
3041
- }
3036
+ tempDegree = coll;
3042
3037
  if (tempDegree === -450) {
3043
3038
  tempDegree = -90;
3044
3039
  }
@@ -3136,12 +3131,7 @@ var Draw = /** @__PURE__ @class */ (function () {
3136
3131
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
3137
3132
  var coll = actObj.rotateFlipColl[i];
3138
3133
  if (typeof (coll) === 'number') {
3139
- if (actObj.shapeDegree === 0) {
3140
- tempDegree = coll;
3141
- }
3142
- else {
3143
- tempDegree = coll - actObj.shapeDegree;
3144
- }
3134
+ tempDegree = coll;
3145
3135
  if (tempDegree === -450) {
3146
3136
  tempDegree = -90;
3147
3137
  }
@@ -7349,7 +7339,7 @@ var Filter = /** @__PURE__ @class */ (function () {
7349
7339
  Filter.prototype.parseFilterString = function (filterString) {
7350
7340
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
7351
7341
  var filterArray = [];
7352
- if (filterString !== 'none') {
7342
+ if (filterString && filterString !== 'none') {
7353
7343
  filterArray = filterString.split(' ').map(function (filter) {
7354
7344
  var _a = filter.match(/([a-z-]+)\(([^)]+)\)/).slice(1, 3), name = _a[0], value = _a[1];
7355
7345
  return { filter: name, value: value };
@@ -12068,6 +12058,7 @@ var Selection = /** @__PURE__ @class */ (function () {
12068
12058
  this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-down');
12069
12059
  parent.activeObj.activePoint = activePoint;
12070
12060
  parent.isShapeDrawing = true;
12061
+ this.tempActiveObj = extend({}, parent.activeObj, {}, true);
12071
12062
  return;
12072
12063
  }
12073
12064
  parent.notify('draw', { prop: 'resetFrameZoom', onPropertyChange: false, value: { isOk: true } });
@@ -28029,7 +28020,7 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
28029
28020
  qualityOptionDiv.appendChild(parent.createElement('button', { id: id + '_qualitybuttonIcon', className: 'e-ie-img-icon-button', attrs: { type: 'button' } }));
28030
28021
  qualityNameDiv.appendChild(qualityOptionDiv);
28031
28022
  if (Browser.isDevice) {
28032
- qualityNameDiv.appendChild(parent.createElement('span', {
28023
+ dialogRightContent.appendChild(parent.createElement('span', {
28033
28024
  id: id + '_qualitySize', className: 'e-ie-img-quality-size'
28034
28025
  }));
28035
28026
  }
@@ -28289,48 +28280,44 @@ var ToolbarModule = /** @__PURE__ @class */ (function () {
28289
28280
  }).bind(this), 'image/jpeg', quality);
28290
28281
  }
28291
28282
  else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'png') {
28292
- if (Browser.isDevice) {
28293
- canvas.style.display = 'none';
28283
+ ctx.drawImage(tempCanvas, 0, 0);
28284
+ tempCanvas.toBlob((function (blob) {
28285
+ fileSize = Math.floor(blob.size / 1024);
28286
+ if (fileSize > 1000) {
28287
+ var megabytes = fileSize / 1024;
28288
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
28289
+ fileSize = +megabytes.toFixed(2);
28290
+ }
28291
+ else {
28292
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize.toFixed(2) + ' KB';
28293
+ fileSize = +fileSize.toFixed(2);
28294
+ }
28295
+ if (Browser.isDevice) {
28296
+ canvas.style.display = 'none';
28297
+ }
28298
+ this.fileSize = fileSize;
28299
+ }).bind(this), 'image/png', 1);
28300
+ }
28301
+ else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'svg') {
28302
+ ctx.drawImage(tempCanvas, 0, 0);
28303
+ var svgDataUrl = tempCanvas.toDataURL('image/svg+xml');
28304
+ var base64Data = svgDataUrl.split(',')[1];
28305
+ var binaryStringLength = base64Data.length;
28306
+ var rawByteSize = binaryStringLength;
28307
+ var fileSize_1 = Math.floor(rawByteSize / 1024); // KB
28308
+ if (fileSize_1 > 1000) {
28309
+ var megabytes = fileSize_1 / 1024; // Convert to MB
28310
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
28311
+ fileSize_1 = +megabytes.toFixed(2);
28294
28312
  }
28295
28313
  else {
28296
- ctx.drawImage(tempCanvas, 0, 0);
28297
- tempCanvas.toBlob((function (blob) {
28298
- fileSize = Math.floor(blob.size / 1024);
28299
- if (fileSize > 1000) {
28300
- var megabytes = fileSize / 1024;
28301
- imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
28302
- fileSize = +megabytes.toFixed(2);
28303
- }
28304
- else {
28305
- imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize.toFixed(2) + ' KB';
28306
- fileSize = +fileSize.toFixed(2);
28307
- }
28308
- this.fileSize = fileSize;
28309
- }).bind(this), 'image/png', 1);
28314
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize_1.toFixed(2) + ' KB';
28315
+ fileSize_1 = +fileSize_1.toFixed(2);
28310
28316
  }
28311
- }
28312
- else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'svg') {
28313
28317
  if (Browser.isDevice) {
28314
28318
  canvas.style.display = 'none';
28315
28319
  }
28316
- else {
28317
- ctx.drawImage(tempCanvas, 0, 0);
28318
- var svgDataUrl = tempCanvas.toDataURL('image/svg+xml');
28319
- var base64Data = svgDataUrl.split(',')[1];
28320
- var binaryStringLength = base64Data.length;
28321
- var rawByteSize = binaryStringLength;
28322
- var fileSize_1 = Math.floor(rawByteSize / 1024); // KB
28323
- if (fileSize_1 > 1000) {
28324
- var megabytes = fileSize_1 / 1024; // Convert to MB
28325
- imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
28326
- fileSize_1 = +megabytes.toFixed(2);
28327
- }
28328
- else {
28329
- imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize_1.toFixed(2) + ' KB';
28330
- fileSize_1 = +fileSize_1.toFixed(2);
28331
- }
28332
- }
28333
- this.fileSize = fileSize;
28320
+ this.fileSize = fileSize_1;
28334
28321
  }
28335
28322
  else {
28336
28323
  if (Browser.isDevice) {