@syncfusion/ej2-image-editor 27.1.48 → 27.1.51

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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 27.1.48
3
+ * version : 27.1.51
4
4
  * Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
5
5
  * Use of this code is subject to the terms of our license.
6
6
  * A copy of the current license can be obtained at any time by e-mailing
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-image-editor@*",
3
- "_id": "@syncfusion/ej2-image-editor@26.1.40",
3
+ "_id": "@syncfusion/ej2-image-editor@27.1.50",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-/biwoXBVMzjuI+sV5nD9nFQu0We46eZ7RIIijvBfnUFHvz+l1GwA715Rv9WXQAjpE5t79pqun0vlXR5LvJPPiw==",
5
+ "_integrity": "sha512-jbOqBMJzNwFx5r4c2P3xYh1n3aW2br4yKOwC8alxYLnRfDY6d5OTbWY62XEAdW30IqaQHH635RpdhZUkHVtGhg==",
6
6
  "_location": "/@syncfusion/ej2-image-editor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,8 +23,8 @@
23
23
  "/@syncfusion/ej2-react-image-editor",
24
24
  "/@syncfusion/ej2-vue-image-editor"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-release/@syncfusion/ej2-image-editor/-/ej2-image-editor-26.1.40.tgz",
27
- "_shasum": "0b718dd8a14ae25320bc8e0f6a0ae807da223e2b",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-27.1.50.tgz",
27
+ "_shasum": "f84391b62e7a8c4e10937b6603abaeb16e3a66d1",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
30
30
  "author": {
@@ -32,14 +32,13 @@
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~27.1.48",
36
- "@syncfusion/ej2-buttons": "~27.1.48",
37
- "@syncfusion/ej2-dropdowns": "~27.1.48",
38
- "@syncfusion/ej2-inputs": "~27.1.48",
39
- "@syncfusion/ej2-navigations": "~27.1.48",
40
- "@syncfusion/ej2-popups": "~27.1.48",
41
- "@syncfusion/ej2-splitbuttons": "~27.1.48",
42
- "markdown-spellcheck": "^1.3.1"
35
+ "@syncfusion/ej2-base": "~27.1.50",
36
+ "@syncfusion/ej2-buttons": "~27.1.51",
37
+ "@syncfusion/ej2-dropdowns": "~27.1.51",
38
+ "@syncfusion/ej2-inputs": "~27.1.50",
39
+ "@syncfusion/ej2-navigations": "~27.1.51",
40
+ "@syncfusion/ej2-popups": "~27.1.50",
41
+ "@syncfusion/ej2-splitbuttons": "~27.1.50"
43
42
  },
44
43
  "deprecated": false,
45
44
  "description": "Essential JS 2 ImageEditor",
@@ -69,7 +68,7 @@
69
68
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
70
69
  },
71
70
  "typings": "index.d.ts",
72
- "version": "27.1.48",
71
+ "version": "27.1.51",
73
72
  "sideEffects": false,
74
73
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
75
74
  }
@@ -1094,7 +1094,7 @@ var Draw = /** @class */ (function () {
1094
1094
  }
1095
1095
  this.drawArrowHead(canvasDraw, true);
1096
1096
  this.drawArrowHead(canvasDraw, false);
1097
- if (actObj.end === 'none') {
1097
+ if (actObj.end === 'none' && actObj.start !== 'circle' && actObj.start !== 'square') {
1098
1098
  this.shapeLine(canvasDraw, actPoint.startX, actPoint.startY, actPoint.endX, actPoint.endY);
1099
1099
  }
1100
1100
  canvasDraw.fillStyle = tempFillStyle;
@@ -1498,9 +1498,10 @@ var Draw = /** @class */ (function () {
1498
1498
  var isStartArrow = actObj.start === 'arrow';
1499
1499
  var isEndArrow = actObj.end === 'arrow';
1500
1500
  var isEndCircleOrSquare = actObj.end === 'circle' || actObj.end === 'square';
1501
+ var isStartCircleOrSquare = actObj.start === 'circle' || actObj.start === 'square';
1501
1502
  if ((start && actObj.triangleDirection === 'left' || actObj.triangleDirection === 'right') &&
1502
- ((isStartArrow && actObj.end === 'none') || (isStartArrow && !isEndCircleOrSquare)) ||
1503
- (!start && (isEndArrow && actObj.start === 'none' || !isStartArrow && !isEndCircleOrSquare))) {
1503
+ ((isStartArrow && actObj.end === 'none') || (isStartArrow && !isEndCircleOrSquare && !isStartCircleOrSquare)) ||
1504
+ (!start && (isEndArrow && actObj.start === 'none' || !isStartArrow && !isEndCircleOrSquare && !isStartCircleOrSquare))) {
1504
1505
  this.shapeLine(canvasDraw, startX, startY, endX, endY);
1505
1506
  }
1506
1507
  if ((start && actObj.triangleDirection === 'left') || (!start && actObj.triangleDirection === 'right')) {
@@ -1535,9 +1536,10 @@ var Draw = /** @class */ (function () {
1535
1536
  var angle = Math.atan2(this.dy, this.dx);
1536
1537
  var isStartArrowSolid = actObj.start === 'arrowSolid';
1537
1538
  var isEndArrowSolid = actObj.end === 'arrowSolid';
1539
+ var isStartCircleOrSquare = actObj.start === 'circle' || actObj.start === 'square';
1538
1540
  var isEndCircleOrSquare = actObj.end === 'circle' || actObj.end === 'square';
1539
- if ((start && (isStartArrowSolid && actObj.end === 'none') || (isStartArrowSolid && !isEndCircleOrSquare)) ||
1540
- (!start && (isEndArrowSolid && actObj.start === 'none' || !isStartArrowSolid && !isEndCircleOrSquare))) {
1541
+ if ((start && (isStartArrowSolid && actObj.end === 'none') || (isStartArrowSolid && !isEndCircleOrSquare && !isStartCircleOrSquare)) ||
1542
+ (!start && (isEndArrowSolid && actObj.start === 'none' || !isStartArrowSolid && !isEndCircleOrSquare && !isStartCircleOrSquare))) {
1541
1543
  this.shapeLine(canvasDraw, startX, startY, endX, endY);
1542
1544
  }
1543
1545
  if ((start && actObj.triangleDirection === 'left') || (!start && actObj.triangleDirection === 'right')) {
@@ -2540,11 +2542,19 @@ var Draw = /** @class */ (function () {
2540
2542
  parent.notify('filter', { prop: 'update-finetunes', onPropertyChange: false });
2541
2543
  }
2542
2544
  proxy.lowerContext.drawImage(parent.baseImg, 0, 0, proxy.parent.lowerCanvas.width, proxy.parent.lowerCanvas.height);
2545
+ var isCropped = false;
2546
+ var isSameDimension = false;
2547
+ if (parent.isImageUpdated) {
2548
+ var _a = parent.img, srcWidth = _a.srcWidth, srcHeight = _a.srcHeight;
2549
+ var _b = parent.baseImgCanvas, width = _b.width, height = _b.height;
2550
+ isCropped = srcWidth !== width || srcHeight !== height;
2551
+ isSameDimension = parent.baseImg.width === width && parent.baseImg.height === height;
2552
+ }
2543
2553
  hideSpinner(parent.element);
2544
2554
  parent.element.style.opacity = '1';
2545
2555
  proxy.updateBaseImgCanvas();
2546
2556
  var fileOpened = { fileName: _this.fileName, fileType: _this.fileType, isValidImage: true };
2547
- proxy.updateCanvas();
2557
+ proxy.updateCanvas(isCropped, isSameDimension);
2548
2558
  if (parent.currObjType.isUndoZoom) {
2549
2559
  parent.currObjType.isUndoZoom = false;
2550
2560
  proxy.parent.lowerCanvas.style.display = 'block';
@@ -2586,12 +2596,26 @@ var Draw = /** @class */ (function () {
2586
2596
  parent.baseImgCanvas.height = parent.baseImg.height;
2587
2597
  parent.baseImgCanvas.getContext('2d').drawImage(parent.baseImg, 0, 0);
2588
2598
  };
2589
- Draw.prototype.updateCanvas = function () {
2599
+ Draw.prototype.updateCanvas = function (isCropped, isSameDimension) {
2590
2600
  var parent = this.parent;
2591
- if (!parent.isImageUpdated) {
2601
+ if (!parent.isImageUpdated || !isCropped) {
2592
2602
  parent.img.srcWidth = parent.baseImgCanvas.width;
2593
2603
  parent.img.srcHeight = parent.baseImgCanvas.height;
2594
2604
  }
2605
+ else if (!isSameDimension && isCropped) {
2606
+ parent.img.srcLeft = 0;
2607
+ parent.img.srcTop = 0;
2608
+ parent.img.srcWidth = parent.baseImgCanvas.width;
2609
+ parent.img.srcHeight = parent.baseImgCanvas.height;
2610
+ parent.currSelectionPoint = null;
2611
+ parent.cropObj = { cropZoom: 0, defaultZoom: 0, totalPannedPoint: { x: 0, y: 0 }, totalPannedClientPoint: { x: 0, y: 0 },
2612
+ totalPannedInternalPoint: { x: 0, y: 0 }, tempFlipPanPoint: { x: 0, y: 0 }, activeObj: {}, rotateFlipColl: [],
2613
+ degree: 0, currFlipState: '', straighten: 0, destPoints: { startX: 0, startY: 0, width: 0, height: 0 },
2614
+ srcPoints: { startX: 0, startY: 0, width: 0, height: 0 }, filter: '', isBrightAdjust: false,
2615
+ zoomFactor: 0, previousZoomValue: 0, aspectWidth: null, aspectHeight: null, frame: 'none', straightenZoom: 0,
2616
+ adjustmentLevel: { brightness: 0, contrast: 0, hue: 0, opacity: 100, saturation: 0, blur: 0,
2617
+ exposure: 0, transparency: 100, sharpen: false, bw: false }, currentFilter: '' };
2618
+ }
2595
2619
  var obj = { width: 0, height: 0 };
2596
2620
  parent.notify('transform', { prop: 'calcMaxDimension', onPropertyChange: false,
2597
2621
  value: { width: parent.img.srcWidth, height: parent.img.srcHeight, obj: obj, isImgShape: null } });
@@ -49,6 +49,9 @@ export declare class Selection {
49
49
  private isPreventShaping;
50
50
  private isGrabbing;
51
51
  private isTouchDblClick;
52
+ private isMouseDown;
53
+ private isMouseUp;
54
+ private mouseWheel;
52
55
  constructor(parent: ImageEditor);
53
56
  destroy(): void;
54
57
  private addEventListener;
@@ -39,6 +39,9 @@ var Selection = /** @class */ (function () {
39
39
  this.isSliderActive = false;
40
40
  this.arrowShape = [ArrowheadType.None, ArrowheadType.SolidArrow];
41
41
  this.isTouchDblClick = false;
42
+ this.isMouseDown = false;
43
+ this.isMouseUp = false;
44
+ this.mouseWheel = 0;
42
45
  this.parent = parent;
43
46
  this.addEventListener();
44
47
  }
@@ -349,6 +352,7 @@ var Selection = /** @class */ (function () {
349
352
  this.isPreventDragging = false;
350
353
  this.timer = undefined;
351
354
  this.tempObjColl = undefined;
355
+ this.mouseWheel = 0;
352
356
  this.textRow = 1;
353
357
  this.mouseDownPoint = { x: 0, y: 0 };
354
358
  this.previousPoint = { x: 0, y: 0 };
@@ -369,6 +373,7 @@ var Selection = /** @class */ (function () {
369
373
  this.mouseDown = '';
370
374
  this.isSliderActive = false;
371
375
  this.arrowShape = [ArrowheadType.None, ArrowheadType.SolidArrow];
376
+ this.isMouseDown = this.isMouseUp = false;
372
377
  };
373
378
  Selection.prototype.performTabAction = function () {
374
379
  var parent = this.parent;
@@ -1368,6 +1373,12 @@ var Selection = /** @class */ (function () {
1368
1373
  parent.notify('shape', { prop: 'updateShapeChangeEventArgs', onPropertyChange: false, value: { shapeSettings: shapeResizingArgs.currentShapeSettings, allowShapeOverflow: shapeResizingArgs.allowShapeOverflow } });
1369
1374
  }
1370
1375
  else {
1376
+ if (this.isMouseDown) {
1377
+ shapeResizingArgs.action = 'resize-start';
1378
+ }
1379
+ else if (this.isMouseUp) {
1380
+ shapeResizingArgs.action = 'resize-end';
1381
+ }
1371
1382
  var selectionResizingArgs = { action: shapeResizingArgs.action,
1372
1383
  previousSelectionSettings: { type: parent.getSelectionType(parent.activeObj.shape),
1373
1384
  startX: shapeResizingArgs.previousShapeSettings.startX,
@@ -3161,6 +3172,8 @@ var Selection = /** @class */ (function () {
3161
3172
  }
3162
3173
  var imageEditorClickEventArgs = { point: this.setXYPoints(e) };
3163
3174
  parent.trigger('click', imageEditorClickEventArgs);
3175
+ this.isMouseDown = true;
3176
+ this.isMouseUp = false;
3164
3177
  this.clickEvent(imageEditorClickEventArgs, e);
3165
3178
  };
3166
3179
  Selection.prototype.getImagePoints = function (x, y) {
@@ -3522,6 +3535,7 @@ var Selection = /** @class */ (function () {
3522
3535
  }
3523
3536
  }
3524
3537
  if (type !== '') {
3538
+ parent.isZoomBtnClick = true;
3525
3539
  parent.notify('draw', { prop: 'performPointZoom', onPropertyChange: false,
3526
3540
  value: { x: center.x, y: center.y, type: type, isResize: null } });
3527
3541
  }
@@ -3604,11 +3618,14 @@ var Selection = /** @class */ (function () {
3604
3618
  this.dragCanvas = parent.togglePan = true;
3605
3619
  }
3606
3620
  }
3621
+ this.isMouseDown = false;
3622
+ this.isMouseUp = false;
3607
3623
  };
3608
3624
  Selection.prototype.mouseUpEventHandler = function (e) {
3609
3625
  var parent = this.parent;
3610
3626
  var id = parent.element.id;
3611
- parent.isKBDNavigation = false;
3627
+ parent.isKBDNavigation = this.isMouseDown = false;
3628
+ this.isMouseUp = true;
3612
3629
  if (!Browser.isDevice && ((parent.element.querySelector('#' + id + '_contextualToolbar') &&
3613
3630
  !parent.element.querySelector('#' + id + '_contextualToolbar').parentElement.classList.contains('e-hide')) ||
3614
3631
  (parent.element.querySelector('#' + id + '_headWrapper')
@@ -3778,6 +3795,11 @@ var Selection = /** @class */ (function () {
3778
3795
  parent.notify('toolbar', { prop: 'destroy-qa-toolbar', onPropertyChange: false });
3779
3796
  }
3780
3797
  }
3798
+ else if (isCropSelection && this.isMouseUp && parent.cursor.indexOf('resize') > -1) {
3799
+ var previousShapeSettings = this.updatePrevShapeSettings();
3800
+ var shapeResizingArgs = { cancel: false, action: 'resize-end', previousShapeSettings: previousShapeSettings };
3801
+ this.triggerShapeChange(shapeResizingArgs, shapeResizingArgs, 'resize');
3802
+ }
3781
3803
  if (parent.activeObj) {
3782
3804
  var isCropSelection_1 = false;
3783
3805
  var splitWords_1;
@@ -3897,6 +3919,7 @@ var Selection = /** @class */ (function () {
3897
3919
  parent.isShapeDrawing = false;
3898
3920
  parent.notify('freehand-draw', { prop: 'resetSelPoints', onPropertyChange: false });
3899
3921
  }
3922
+ this.isMouseUp = false;
3900
3923
  };
3901
3924
  Selection.prototype.adjustActObjForLineArrow = function (obj) {
3902
3925
  var isAdjusted = false;
@@ -4352,6 +4375,7 @@ var Selection = /** @class */ (function () {
4352
4375
  case (e.ctrlKey && '+'):
4353
4376
  if ((parent.zoomSettings.zoomTrigger & ZoomTrigger.Commands) === ZoomTrigger.Commands) {
4354
4377
  this.zoomType = 'Commands';
4378
+ parent.isZoomBtnClick = true;
4355
4379
  parent.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
4356
4380
  value: { zoomFactor: .1, zoomPoint: null }, isResize: null });
4357
4381
  parent.notify('draw', { prop: 'redrawDownScale' });
@@ -4368,6 +4392,7 @@ var Selection = /** @class */ (function () {
4368
4392
  case (e.ctrlKey && '-'):
4369
4393
  if ((parent.zoomSettings.zoomTrigger & ZoomTrigger.Commands) === ZoomTrigger.Commands) {
4370
4394
  this.zoomType = 'Commands';
4395
+ parent.isZoomBtnClick = true;
4371
4396
  parent.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
4372
4397
  value: { zoomFactor: -.1, zoomPoint: null }, isResize: null });
4373
4398
  parent.notify('draw', { prop: 'redrawDownScale' });
@@ -4504,6 +4529,11 @@ var Selection = /** @class */ (function () {
4504
4529
  e.stopImmediatePropagation();
4505
4530
  };
4506
4531
  Selection.prototype.handleScroll = function (e) {
4532
+ this.mouseWheel++;
4533
+ if (this.mouseWheel === 2) {
4534
+ this.mouseWheel = 0;
4535
+ return;
4536
+ }
4507
4537
  var parent = this.parent;
4508
4538
  var x;
4509
4539
  var y;
@@ -4539,6 +4569,7 @@ var Selection = /** @class */ (function () {
4539
4569
  }
4540
4570
  }
4541
4571
  if (type !== '') {
4572
+ parent.isZoomBtnClick = true;
4542
4573
  parent.notify('draw', { prop: 'performPointZoom', onPropertyChange: false,
4543
4574
  value: { x: x, y: y, type: type, isResize: null } });
4544
4575
  parent.notify('draw', { prop: 'redrawDownScale' });
@@ -4903,6 +4934,12 @@ var Selection = /** @class */ (function () {
4903
4934
  parent.editCompleteArgs = shapeChangingArgs;
4904
4935
  }
4905
4936
  else {
4937
+ if (this.isMouseDown) {
4938
+ shapeChangingArgs.action = 'resize-start';
4939
+ }
4940
+ else if (this.isMouseUp) {
4941
+ shapeChangingArgs.action = 'resize-end';
4942
+ }
4906
4943
  var selectionChangingArgs = { action: shapeChangingArgs.action,
4907
4944
  previousSelectionSettings: { type: parent.getSelectionType(parent.activeObj.shape),
4908
4945
  startX: shapeChangingArgs.previousShapeSettings.startX,
@@ -404,6 +404,10 @@ var Shape = /** @class */ (function () {
404
404
  parent.activeObj.opacity = opacity;
405
405
  }
406
406
  strokeSettings.strokeWidth = strokeWidth ? strokeWidth : strokeSettings.strokeWidth;
407
+ var shape = parent.activeObj.shape;
408
+ if ((shape === 'rectangle' || shape === 'ellipse') && strokeWidth === 0) {
409
+ strokeSettings.strokeWidth = 0;
410
+ }
407
411
  strokeSettings.strokeColor = strokeColor ? strokeColor : strokeSettings.strokeColor;
408
412
  strokeSettings.fillColor = fillColor ? fillColor : strokeSettings.fillColor;
409
413
  strokeSettings.radius = radius ? radius : strokeSettings.radius;
@@ -1103,12 +1103,22 @@ var UndoRedo = /** @class */ (function () {
1103
1103
  var parent = this.parent;
1104
1104
  for (var i = 0; i < parent.objColl.length; i++) {
1105
1105
  var obj = parent.objColl[i];
1106
+ var isUpdated = false;
1106
1107
  if (obj.shape === 'line' || obj.shape === 'arrow') {
1107
1108
  if (obj.activePoint.width < 0) {
1108
1109
  obj.activePoint.width = Math.abs(obj.activePoint.width);
1110
+ isUpdated = true;
1109
1111
  }
1110
1112
  if (obj.activePoint.height < 0) {
1111
1113
  obj.activePoint.height = Math.abs(obj.activePoint.height);
1114
+ isUpdated = true;
1115
+ }
1116
+ if (isUpdated) {
1117
+ var activeObj = extend({}, parent.activeObj, {}, true);
1118
+ parent.activeObj = obj;
1119
+ parent.notify('shape', { prop: 'updImgRatioForActObj', onPropertyChange: false });
1120
+ obj = parent.activeObj;
1121
+ parent.activeObj = activeObj;
1112
1122
  }
1113
1123
  }
1114
1124
  }
@@ -736,6 +736,8 @@ var ImageEditor = /** @class */ (function (_super) {
736
736
  this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: browseObj } });
737
737
  var supportObj = { key: 'SupportText' };
738
738
  this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: supportObj } });
739
+ var andObj = { key: 'And' };
740
+ this.notify('toolbar', { prop: 'getLocaleText', onPropertyChange: false, value: { obj: andObj } });
739
741
  var dropAreaElement = this.createElement('div', { id: this.element.id + '_dropArea', className: 'e-ie-drop-area', attrs: { style: 'position: relative;' } });
740
742
  var dropIconElement = this.createElement('span', { className: 'e-ie-drop-icon e-icons e-image', attrs: { style: 'position: absolute;' } });
741
743
  var dropContentElement = this.createElement('span', { className: 'e-ie-drop-content', attrs: { style: 'position: absolute; display: none;' } });
@@ -751,7 +753,7 @@ var ImageEditor = /** @class */ (function (_super) {
751
753
  dropAnchorElement.href = '';
752
754
  minDropAnchorElem.href = '';
753
755
  var dropInfoElement = this.createElement('span', { className: 'e-ie-drop-info', attrs: { position: 'absolute' } });
754
- dropInfoElement.textContent = supportObj['value'] + ' SVG, PNG, and JPG';
756
+ dropInfoElement.textContent = supportObj['value'] + ' SVG, PNG, ' + andObj['value'] + ' JPG';
755
757
  var dropUploader = dropAreaElement.appendChild(this.createElement('input', {
756
758
  id: this.element.id + '_dropfileUpload', className: 'e-fileUpload e-image-upload'
757
759
  }));
@@ -995,7 +997,7 @@ var ImageEditor = /** @class */ (function (_super) {
995
997
  this.notify('draw', { prop: 'open', value: { data: data } });
996
998
  }
997
999
  else {
998
- this.updateImage(data, imageSettings.backgroundColor);
1000
+ this.updateImage(data, imageSettings ? imageSettings.backgroundColor : null);
999
1001
  }
1000
1002
  };
1001
1003
  /**
@@ -2221,7 +2223,7 @@ var ImageEditor = /** @class */ (function (_super) {
2221
2223
  };
2222
2224
  ImageEditor.prototype.updateImage = function (data, imageBackgroundColor) {
2223
2225
  var _this = this;
2224
- if (data || imageBackgroundColor) {
2226
+ if (data || imageBackgroundColor || imageBackgroundColor === '') {
2225
2227
  var prevCropObj_1 = extend({}, this.cropObj, {}, true);
2226
2228
  var object = { currObj: {} };
2227
2229
  this.notify('filter', { prop: 'getCurrentObj', onPropertyChange: false, value: { object: object } });
@@ -2263,7 +2265,7 @@ var ImageEditor = /** @class */ (function (_super) {
2263
2265
  }
2264
2266
  }, 100);
2265
2267
  }
2266
- if (imageBackgroundColor) {
2268
+ if (imageBackgroundColor || imageBackgroundColor === '') {
2267
2269
  this.notify('draw', { prop: 'imageBackgroundColor', onPropertyChange: false, value: { color: imageBackgroundColor } });
2268
2270
  this.notify('draw', { prop: 'render-image', value: { isMouseWheel: false } });
2269
2271
  if (!data) {
@@ -201,7 +201,8 @@ var ToolbarModule = /** @class */ (function () {
201
201
  BorderRadius: 'Border Radius',
202
202
  TextOutlineColor: 'Outline Color',
203
203
  TextOutlineWidth: 'Outline Width',
204
- PixelSize: 'Pixel Size'
204
+ PixelSize: 'Pixel Size',
205
+ And: 'and'
205
206
  };
206
207
  this.l10n = new L10n('image-editor', this.defaultLocale, this.parent.locale);
207
208
  };
@@ -869,13 +870,11 @@ var ToolbarModule = /** @class */ (function () {
869
870
  zoomIn.addEventListener('mousedown', this.zoomInBtnMouseDownHandler.bind(this));
870
871
  zoomIn.addEventListener('mouseup', this.zoomBtnMouseUpHandler.bind(this));
871
872
  zoomIn.addEventListener('click', this.zoomInBtnClickHandler.bind(this));
872
- zoomIn.addEventListener('touchstart', this.zoomInBtnClickHandler.bind(this));
873
873
  }
874
874
  if (zoomOut) {
875
875
  zoomOut.addEventListener('mousedown', this.zoomOutBtnMouseDownHandler.bind(this));
876
876
  zoomOut.addEventListener('mouseup', this.zoomBtnMouseUpHandler.bind(this));
877
877
  zoomOut.addEventListener('click', this.zoomOutBtnClickHandler.bind(this));
878
- zoomIn.addEventListener('touchstart', this.zoomInBtnClickHandler.bind(this));
879
878
  }
880
879
  };
881
880
  ToolbarModule.prototype.widthPress = function (e) {
@@ -1391,6 +1390,9 @@ var ToolbarModule = /** @class */ (function () {
1391
1390
  zOrderElement.classList.remove('e-overlay');
1392
1391
  }
1393
1392
  }
1393
+ if (zOrderElement && (parent.shapeColl.length === 0 || (obj['freehandDrawSelectedId'] && parent.shapeColl.length === 1))) {
1394
+ zOrderElement.classList.add('e-overlay');
1395
+ }
1394
1396
  };
1395
1397
  ToolbarModule.prototype.renderStraightenSlider = function () {
1396
1398
  var parent = this.parent;
@@ -1860,11 +1862,11 @@ var ToolbarModule = /** @class */ (function () {
1860
1862
  fileSize = Math.floor(blob.size / 1024);
1861
1863
  if (fileSize > 1000) {
1862
1864
  var megabytes = fileSize / 1024;
1863
- imageNameLabel.innerHTML = 'Image size: ' + megabytes.toFixed(2) + ' MB';
1865
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
1864
1866
  fileSize = +megabytes.toFixed(2);
1865
1867
  }
1866
1868
  else {
1867
- imageNameLabel.innerHTML = 'Image size: ' + fileSize.toFixed(2) + ' KB';
1869
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize.toFixed(2) + ' KB';
1868
1870
  fileSize = +fileSize.toFixed(2);
1869
1871
  }
1870
1872
  if (Browser.isDevice) {
@@ -1882,6 +1884,50 @@ var ToolbarModule = /** @class */ (function () {
1882
1884
  this.fileSize = fileSize;
1883
1885
  }).bind(this), 'image/jpeg', quality);
1884
1886
  }
1887
+ else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'png') {
1888
+ if (Browser.isDevice) {
1889
+ canvas.style.display = 'none';
1890
+ }
1891
+ else {
1892
+ ctx.drawImage(tempCanvas, 0, 0);
1893
+ tempCanvas.toBlob((function (blob) {
1894
+ fileSize = Math.floor(blob.size / 1024);
1895
+ if (fileSize > 1000) {
1896
+ var megabytes = fileSize / 1024;
1897
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
1898
+ fileSize = +megabytes.toFixed(2);
1899
+ }
1900
+ else {
1901
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize.toFixed(2) + ' KB';
1902
+ fileSize = +fileSize.toFixed(2);
1903
+ }
1904
+ this.fileSize = fileSize;
1905
+ }).bind(this), 'image/png', 1);
1906
+ }
1907
+ }
1908
+ else if (!isNullOrUndefined(fileType) && fileType.toLowerCase() === 'svg') {
1909
+ if (Browser.isDevice) {
1910
+ canvas.style.display = 'none';
1911
+ }
1912
+ else {
1913
+ ctx.drawImage(tempCanvas, 0, 0);
1914
+ var svgDataUrl = tempCanvas.toDataURL('image/svg+xml');
1915
+ var base64Data = svgDataUrl.split(',')[1];
1916
+ var binaryStringLength = base64Data.length;
1917
+ var rawByteSize = binaryStringLength;
1918
+ var fileSize_1 = Math.floor(rawByteSize / 1024); // KB
1919
+ if (fileSize_1 > 1000) {
1920
+ var megabytes = fileSize_1 / 1024; // Convert to MB
1921
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + megabytes.toFixed(2) + ' MB';
1922
+ fileSize_1 = +megabytes.toFixed(2);
1923
+ }
1924
+ else {
1925
+ imageNameLabel.innerHTML = this.l10n.getConstant('ImageSize') + ': ' + fileSize_1.toFixed(2) + ' KB';
1926
+ fileSize_1 = +fileSize_1.toFixed(2);
1927
+ }
1928
+ }
1929
+ this.fileSize = fileSize;
1930
+ }
1885
1931
  else {
1886
1932
  if (Browser.isDevice) {
1887
1933
  canvas.style.display = 'none';
@@ -5427,6 +5473,7 @@ var ToolbarModule = /** @class */ (function () {
5427
5473
  parent.notify('draw', { prop: 'render-image', value: { isMouseWheel: null, isPreventClearRect: null, isFrame: true } });
5428
5474
  parent.isFrameBtnClick = true;
5429
5475
  parent.curFrameObjEvent = { previousFrameSetting: parent.tempFrameObj, currentFrameSetting: parent.frameObj };
5476
+ parent.notify('draw', { prop: 'triggerFrameChange', value: { prevFrameSettings: parent.tempFrameObj, obj: { frameChangeEventArgs: null } } });
5430
5477
  break;
5431
5478
  case 'redact':
5432
5479
  parent.currObjType.isRedact = true;
@@ -5553,6 +5600,7 @@ var ToolbarModule = /** @class */ (function () {
5553
5600
  parent.img.destTop += (parent.cxtTbarHeight / 2);
5554
5601
  }
5555
5602
  this.callFrameToolbar();
5603
+ parent.notify('draw', { prop: 'triggerFrameChange', value: { prevFrameSettings: parent.frameObj, obj: { frameChangeEventArgs: null } } });
5556
5604
  }
5557
5605
  };
5558
5606
  ToolbarModule.prototype.zoomToFrameRange = function () {