@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.
@@ -3004,12 +3004,7 @@ class Draw {
3004
3004
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
3005
3005
  let coll = actObj.rotateFlipColl[i];
3006
3006
  if (typeof (coll) === 'number') {
3007
- if (actObj.shapeDegree === 0) {
3008
- tempDegree = coll;
3009
- }
3010
- else {
3011
- tempDegree = coll - actObj.shapeDegree;
3012
- }
3007
+ tempDegree = coll;
3013
3008
  if (tempDegree === -450) {
3014
3009
  tempDegree = -90;
3015
3010
  }
@@ -3107,12 +3102,7 @@ class Draw {
3107
3102
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
3108
3103
  let coll = actObj.rotateFlipColl[i];
3109
3104
  if (typeof (coll) === 'number') {
3110
- if (actObj.shapeDegree === 0) {
3111
- tempDegree = coll;
3112
- }
3113
- else {
3114
- tempDegree = coll - actObj.shapeDegree;
3115
- }
3105
+ tempDegree = coll;
3116
3106
  if (tempDegree === -450) {
3117
3107
  tempDegree = -90;
3118
3108
  }
@@ -7300,7 +7290,7 @@ class Filter {
7300
7290
  parseFilterString(filterString) {
7301
7291
  /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
7302
7292
  let filterArray = [];
7303
- if (filterString !== 'none') {
7293
+ if (filterString && filterString !== 'none') {
7304
7294
  filterArray = filterString.split(' ').map((filter) => {
7305
7295
  const [name, value] = filter.match(/([a-z-]+)\(([^)]+)\)/).slice(1, 3);
7306
7296
  return { filter: name, value: value };
@@ -12006,6 +11996,7 @@ class Selection {
12006
11996
  this.triggerShapeChange(shapeResizingArgs, shapeMovingArgs, 'mouse-down');
12007
11997
  parent.activeObj.activePoint = activePoint;
12008
11998
  parent.isShapeDrawing = true;
11999
+ this.tempActiveObj = extend({}, parent.activeObj, {}, true);
12009
12000
  return;
12010
12001
  }
12011
12002
  parent.notify('draw', { prop: 'resetFrameZoom', onPropertyChange: false, value: { isOk: true } });
@@ -27912,7 +27903,7 @@ class ToolbarModule {
27912
27903
  qualityOptionDiv.appendChild(parent.createElement('button', { id: id + '_qualitybuttonIcon', className: 'e-ie-img-icon-button', attrs: { type: 'button' } }));
27913
27904
  qualityNameDiv.appendChild(qualityOptionDiv);
27914
27905
  if (Browser.isDevice) {
27915
- qualityNameDiv.appendChild(parent.createElement('span', {
27906
+ dialogRightContent.appendChild(parent.createElement('span', {
27916
27907
  id: id + '_qualitySize', className: 'e-ie-img-quality-size'
27917
27908
  }));
27918
27909
  }
@@ -28170,39 +28161,11 @@ class ToolbarModule {
28170
28161
  }).bind(this), 'image/jpeg', quality);
28171
28162
  }
28172
28163
  else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'png') {
28173
- if (Browser.isDevice) {
28174
- canvas.style.display = 'none';
28175
- }
28176
- else {
28177
- ctx.drawImage(tempCanvas, 0, 0);
28178
- tempCanvas.toBlob((function (blob) {
28179
- fileSize = Math.floor(blob.size / 1024);
28180
- if (fileSize > 1000) {
28181
- const megabytes = fileSize / 1024;
28182
- imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
28183
- fileSize = +megabytes.toFixed(2);
28184
- }
28185
- else {
28186
- imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize.toFixed(2) + ' KB';
28187
- fileSize = +fileSize.toFixed(2);
28188
- }
28189
- this.fileSize = fileSize;
28190
- }).bind(this), 'image/png', 1);
28191
- }
28192
- }
28193
- else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'svg') {
28194
- if (Browser.isDevice) {
28195
- canvas.style.display = 'none';
28196
- }
28197
- else {
28198
- ctx.drawImage(tempCanvas, 0, 0);
28199
- const svgDataUrl = tempCanvas.toDataURL('image/svg+xml');
28200
- const base64Data = svgDataUrl.split(',')[1];
28201
- const binaryStringLength = base64Data.length;
28202
- const rawByteSize = binaryStringLength;
28203
- let fileSize = Math.floor(rawByteSize / 1024); // KB
28164
+ ctx.drawImage(tempCanvas, 0, 0);
28165
+ tempCanvas.toBlob((function (blob) {
28166
+ fileSize = Math.floor(blob.size / 1024);
28204
28167
  if (fileSize > 1000) {
28205
- const megabytes = fileSize / 1024; // Convert to MB
28168
+ const megabytes = fileSize / 1024;
28206
28169
  imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
28207
28170
  fileSize = +megabytes.toFixed(2);
28208
28171
  }
@@ -28210,6 +28173,30 @@ class ToolbarModule {
28210
28173
  imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize.toFixed(2) + ' KB';
28211
28174
  fileSize = +fileSize.toFixed(2);
28212
28175
  }
28176
+ if (Browser.isDevice) {
28177
+ canvas.style.display = 'none';
28178
+ }
28179
+ this.fileSize = fileSize;
28180
+ }).bind(this), 'image/png', 1);
28181
+ }
28182
+ else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'svg') {
28183
+ ctx.drawImage(tempCanvas, 0, 0);
28184
+ const svgDataUrl = tempCanvas.toDataURL('image/svg+xml');
28185
+ const base64Data = svgDataUrl.split(',')[1];
28186
+ const binaryStringLength = base64Data.length;
28187
+ const rawByteSize = binaryStringLength;
28188
+ let fileSize = Math.floor(rawByteSize / 1024); // KB
28189
+ if (fileSize > 1000) {
28190
+ const megabytes = fileSize / 1024; // Convert to MB
28191
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
28192
+ fileSize = +megabytes.toFixed(2);
28193
+ }
28194
+ else {
28195
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize.toFixed(2) + ' KB';
28196
+ fileSize = +fileSize.toFixed(2);
28197
+ }
28198
+ if (Browser.isDevice) {
28199
+ canvas.style.display = 'none';
28213
28200
  }
28214
28201
  this.fileSize = fileSize;
28215
28202
  }