@syncfusion/ej2-image-editor 22.2.11 → 23.1.38

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 (119) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/ej2-image-editor.umd.min.js +3 -3
  3. package/dist/ej2-image-editor.umd.min.js.map +1 -1
  4. package/dist/es6/ej2-image-editor.es2015.js +4446 -678
  5. package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
  6. package/dist/es6/ej2-image-editor.es5.js +4409 -632
  7. package/dist/es6/ej2-image-editor.es5.js.map +1 -1
  8. package/dist/global/ej2-image-editor.min.js +3 -3
  9. package/dist/global/ej2-image-editor.min.js.map +1 -1
  10. package/dist/global/index.d.ts +2 -2
  11. package/package.json +12 -12
  12. package/src/image-editor/action/crop.js +47 -30
  13. package/src/image-editor/action/draw.d.ts +16 -0
  14. package/src/image-editor/action/draw.js +827 -81
  15. package/src/image-editor/action/export.d.ts +3 -0
  16. package/src/image-editor/action/export.js +84 -20
  17. package/src/image-editor/action/filter.d.ts +0 -1
  18. package/src/image-editor/action/filter.js +28 -41
  19. package/src/image-editor/action/freehand-draw.d.ts +1 -0
  20. package/src/image-editor/action/freehand-draw.js +92 -56
  21. package/src/image-editor/action/selection.d.ts +6 -0
  22. package/src/image-editor/action/selection.js +417 -68
  23. package/src/image-editor/action/shape.d.ts +8 -0
  24. package/src/image-editor/action/shape.js +303 -91
  25. package/src/image-editor/action/transform.d.ts +9 -0
  26. package/src/image-editor/action/transform.js +402 -52
  27. package/src/image-editor/action/undo-redo.d.ts +1 -0
  28. package/src/image-editor/action/undo-redo.js +138 -10
  29. package/src/image-editor/base/enum.d.ts +38 -1
  30. package/src/image-editor/base/enum.js +39 -0
  31. package/src/image-editor/base/image-editor-model.d.ts +16 -2
  32. package/src/image-editor/base/image-editor.d.ts +142 -7
  33. package/src/image-editor/base/image-editor.js +719 -70
  34. package/src/image-editor/base/interface.d.ts +233 -2
  35. package/src/image-editor/renderer/toolbar.d.ts +25 -0
  36. package/src/image-editor/renderer/toolbar.js +1274 -72
  37. package/styles/bootstrap-dark.css +73 -1
  38. package/styles/bootstrap.css +73 -1
  39. package/styles/bootstrap4.css +73 -1
  40. package/styles/bootstrap5-dark.css +73 -1
  41. package/styles/bootstrap5.css +73 -1
  42. package/styles/fabric-dark.css +73 -1
  43. package/styles/fabric.css +73 -1
  44. package/styles/fluent-dark.css +73 -1
  45. package/styles/fluent.css +73 -1
  46. package/styles/highcontrast-light.css +75 -3
  47. package/styles/highcontrast.css +74 -7
  48. package/styles/image-editor/_bootstrap-dark-definition.scss +1 -0
  49. package/styles/image-editor/_bootstrap-definition.scss +1 -0
  50. package/styles/image-editor/_bootstrap4-definition.scss +1 -0
  51. package/styles/image-editor/_bootstrap5-definition.scss +1 -0
  52. package/styles/image-editor/_fabric-dark-definition.scss +1 -0
  53. package/styles/image-editor/_fabric-definition.scss +1 -0
  54. package/styles/image-editor/_fluent-definition.scss +1 -0
  55. package/styles/image-editor/_fusionnew-definition.scss +1 -0
  56. package/styles/image-editor/_highcontrast-definition.scss +2 -1
  57. package/styles/image-editor/_highcontrast-light-definition.scss +2 -1
  58. package/styles/image-editor/_layout.scss +98 -0
  59. package/styles/image-editor/_material-dark-definition.scss +1 -0
  60. package/styles/image-editor/_material-definition.scss +1 -0
  61. package/styles/image-editor/_material3-definition.scss +2 -1
  62. package/styles/image-editor/_tailwind-definition.scss +1 -0
  63. package/styles/image-editor/_theme.scss +4 -2
  64. package/styles/image-editor/bootstrap-dark.css +73 -1
  65. package/styles/image-editor/bootstrap-dark.scss +1 -1
  66. package/styles/image-editor/bootstrap.css +73 -1
  67. package/styles/image-editor/bootstrap.scss +1 -1
  68. package/styles/image-editor/bootstrap4.css +73 -1
  69. package/styles/image-editor/bootstrap4.scss +1 -1
  70. package/styles/image-editor/bootstrap5-dark.css +73 -1
  71. package/styles/image-editor/bootstrap5-dark.scss +1 -1
  72. package/styles/image-editor/bootstrap5.css +73 -1
  73. package/styles/image-editor/bootstrap5.scss +1 -1
  74. package/styles/image-editor/fabric-dark.css +73 -1
  75. package/styles/image-editor/fabric-dark.scss +1 -1
  76. package/styles/image-editor/fabric.css +73 -1
  77. package/styles/image-editor/fabric.scss +1 -1
  78. package/styles/image-editor/fluent-dark.css +73 -1
  79. package/styles/image-editor/fluent-dark.scss +1 -1
  80. package/styles/image-editor/fluent.css +73 -1
  81. package/styles/image-editor/fluent.scss +1 -1
  82. package/styles/image-editor/highcontrast-light.css +75 -3
  83. package/styles/image-editor/highcontrast-light.scss +1 -1
  84. package/styles/image-editor/highcontrast.css +74 -7
  85. package/styles/image-editor/highcontrast.scss +1 -1
  86. package/styles/image-editor/icons/_bootstrap-dark.scss +1 -0
  87. package/styles/image-editor/icons/_bootstrap.scss +1 -0
  88. package/styles/image-editor/icons/_bootstrap4.scss +1 -0
  89. package/styles/image-editor/icons/_bootstrap5.scss +1 -0
  90. package/styles/image-editor/icons/_fabric-dark.scss +1 -0
  91. package/styles/image-editor/icons/_fabric.scss +1 -0
  92. package/styles/image-editor/icons/_fluent.scss +1 -0
  93. package/styles/image-editor/icons/_fusionnew.scss +1 -0
  94. package/styles/image-editor/icons/_highcontrast-light.scss +1 -0
  95. package/styles/image-editor/icons/_highcontrast.scss +1 -0
  96. package/styles/image-editor/icons/_material-dark.scss +1 -0
  97. package/styles/image-editor/icons/_material.scss +1 -0
  98. package/styles/image-editor/icons/_material3.scss +1 -0
  99. package/styles/image-editor/icons/_tailwind.scss +1 -0
  100. package/styles/image-editor/material-dark.css +73 -2
  101. package/styles/image-editor/material-dark.scss +1 -1
  102. package/styles/image-editor/material.css +73 -2
  103. package/styles/image-editor/material.scss +1 -1
  104. package/styles/image-editor/material3-dark.css +78 -4
  105. package/styles/image-editor/material3-dark.scss +1 -1
  106. package/styles/image-editor/material3.css +78 -4
  107. package/styles/image-editor/material3.scss +1 -1
  108. package/styles/image-editor/tailwind-dark.css +73 -2
  109. package/styles/image-editor/tailwind-dark.scss +1 -1
  110. package/styles/image-editor/tailwind.css +73 -2
  111. package/styles/image-editor/tailwind.scss +1 -1
  112. package/styles/material-dark.css +73 -2
  113. package/styles/material.css +73 -2
  114. package/styles/material3-dark.css +78 -4
  115. package/styles/material3-dark.scss +1 -1
  116. package/styles/material3.css +78 -4
  117. package/styles/material3.scss +1 -1
  118. package/styles/tailwind-dark.css +73 -2
  119. package/styles/tailwind.css +73 -2
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 22.2.11
4
- * Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.
3
+ * version : 23.1.38
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
7
7
  * licensing@syncfusion.com. Any infringement will be prosecuted under
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "@syncfusion/ej2-image-editor@*",
3
- "_id": "@syncfusion/ej2-image-editor@22.2.10",
3
+ "_id": "@syncfusion/ej2-image-editor@23.1.36",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-eBIoOxPFr9uETyfD1UX79OoCSsyIMz1KIWVz7PsIBJfzJCSO5J+pxGOm2FkWt0KJrUeGBVb0xwYW7xhvDA2wJQ==",
5
+ "_integrity": "sha512-A6bph2XTzzn8GAjli/kAtAz4JPSrDYTzAQF6UOa0I+RqOKB3/w2/7CBmLNKlQVFd3I5nyY45z1M26X0ua0+48w==",
6
6
  "_location": "/@syncfusion/ej2-image-editor",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -23,21 +23,21 @@
23
23
  "/@syncfusion/ej2-react-image-editor",
24
24
  "/@syncfusion/ej2-vue-image-editor"
25
25
  ],
26
- "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-22.2.10.tgz",
27
- "_shasum": "dc022c0050e96ec45295004156d94db2a63b0a1b",
26
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-23.1.36.tgz",
27
+ "_shasum": "b13260748329c7b0412240bdd9714f2bbeb97281",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
- "_where": "/jenkins/workspace/elease-automation_release_21.1.1/packages/included",
29
+ "_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
30
30
  "author": {
31
31
  "name": "Syncfusion Inc."
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~22.2.10",
36
- "@syncfusion/ej2-buttons": "~22.2.9",
37
- "@syncfusion/ej2-inputs": "~22.2.9",
38
- "@syncfusion/ej2-navigations": "~22.2.11",
39
- "@syncfusion/ej2-popups": "~22.2.11",
40
- "@syncfusion/ej2-splitbuttons": "~22.2.8"
35
+ "@syncfusion/ej2-base": "~23.1.38",
36
+ "@syncfusion/ej2-buttons": "~23.1.36",
37
+ "@syncfusion/ej2-inputs": "~23.1.38",
38
+ "@syncfusion/ej2-navigations": "~23.1.36",
39
+ "@syncfusion/ej2-popups": "~23.1.38",
40
+ "@syncfusion/ej2-splitbuttons": "~23.1.36"
41
41
  },
42
42
  "deprecated": false,
43
43
  "description": "Essential JS 2 ImageEditor",
@@ -67,7 +67,7 @@
67
67
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
68
68
  },
69
69
  "typings": "index.d.ts",
70
- "version": "22.2.11",
70
+ "version": "23.1.38",
71
71
  "sideEffects": false,
72
72
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
73
73
  }
@@ -99,12 +99,19 @@ var Crop = /** @class */ (function () {
99
99
  Crop.prototype.cropImg = function (isRotateCrop) {
100
100
  var parent = this.parent;
101
101
  var isNullCrop = isNullOrUndefined(isRotateCrop);
102
+ var resizeIcon = this.parent.element.querySelector('#' + this.parent.element.id + '_nonaspectratio');
102
103
  var actPoint = parent.activeObj.activePoint;
104
+ var isRotated = false;
105
+ for (var i = 0; i < parent.rotateFlipColl.length; i++) {
106
+ if (parent.rotateFlipColl[i] === 90 || parent.rotateFlipColl[i] === -90) {
107
+ isRotated = true;
108
+ }
109
+ }
103
110
  parent.notify('draw', { prop: 'setImageEdited', onPropertyChange: false });
104
- if (isNullCrop) {
111
+ if (isNullCrop || resizeIcon) {
105
112
  this.croppedDegree = parent.transform.degree;
106
113
  }
107
- if (isNullCrop && parent.transform.degree !== 0) {
114
+ if (isNullCrop && (parent.transform.degree !== 0) || isRotated) {
108
115
  this.updateCropObj();
109
116
  var point = { startX: parent.img.destLeft, startY: parent.img.destTop, width: parent.img.destWidth,
110
117
  height: parent.img.destHeight };
@@ -135,7 +142,7 @@ var Crop = /** @class */ (function () {
135
142
  var obj = { width: 0, height: 0 };
136
143
  parent.notify('transform', { prop: 'calcMaxDimension', onPropertyChange: false,
137
144
  value: { width: actPoint.width * ratio.width,
138
- height: actPoint.height * ratio.height, obj: obj } });
145
+ height: actPoint.height * ratio.height, obj: obj, isImgShape: null } });
139
146
  var maxDimension = obj;
140
147
  this.upperContext.clearRect(0, 0, parent.upperCanvas.width, parent.upperCanvas.height);
141
148
  this.lowerContext.clearRect(0, 0, parent.lowerCanvas.width, parent.lowerCanvas.height);
@@ -148,8 +155,7 @@ var Crop = /** @class */ (function () {
148
155
  parent.img.destWidth = maxDimension.width;
149
156
  parent.img.destHeight = maxDimension.height;
150
157
  var temp = this.lowerContext.filter;
151
- parent.notify('filter', { prop: 'updateBrightFilter', onPropertyChange: false });
152
- this.lowerContext.drawImage(parent.baseImg, parent.img.srcLeft, parent.img.srcTop, parent.img.srcWidth, parent.img.srcHeight, parent.img.destLeft, parent.img.destTop, parent.img.destWidth, parent.img.destHeight);
158
+ parent.notify('draw', { prop: 'drawImage', onPropertyChange: false });
153
159
  this.lowerContext.filter = 'none';
154
160
  var activeObj = extend({}, parent.activeObj, {}, true);
155
161
  this.cropObjColl();
@@ -166,7 +172,7 @@ var Crop = /** @class */ (function () {
166
172
  parent.notify('freehand-draw', { prop: 'zoomFHDColl', onPropertyChange: false, value: { isPreventApply: null } });
167
173
  parent.notify('draw', { prop: 'clearOuterCanvas', onPropertyChange: false, value: { context: this.lowerContext } });
168
174
  parent.notify('draw', { prop: 'clearOuterCanvas', onPropertyChange: false, value: { context: this.upperContext } });
169
- if (parent.currSelectionPoint.shape === 'crop-circle') {
175
+ if (parent.currSelectionPoint != null && parent.currSelectionPoint.shape === 'crop-circle') {
170
176
  this.cropCircle(this.lowerContext);
171
177
  }
172
178
  else {
@@ -269,7 +275,7 @@ var Crop = /** @class */ (function () {
269
275
  for (var i = 0; i < (zoomFactor * 10); i++) {
270
276
  parent.isUndoRedo = true;
271
277
  parent.notify('transform', { prop: 'zoomAction', onPropertyChange: false,
272
- value: { zoomFactor: -0.1, zoomPoint: null } });
278
+ value: { zoomFactor: -0.1, zoomPoint: null }, isResize: null });
273
279
  }
274
280
  parent.isUndoRedo = isUndoRedo;
275
281
  parent.notify('draw', { prop: 'resetPanPoints', onPropertyChange: false });
@@ -292,8 +298,7 @@ var Crop = /** @class */ (function () {
292
298
  this.lowerContext.clearRect(0, 0, parent.lowerCanvas.width, parent.lowerCanvas.height);
293
299
  this.upperContext.clearRect(0, 0, parent.upperCanvas.width, parent.upperCanvas.height);
294
300
  var temp = this.lowerContext.filter;
295
- parent.notify('filter', { prop: 'updateBrightFilter', onPropertyChange: false });
296
- this.lowerContext.drawImage(parent.baseImg, parent.img.srcLeft, parent.img.srcTop, parent.img.srcWidth, parent.img.srcHeight, parent.img.destLeft, parent.img.destTop, parent.img.destWidth, parent.img.destHeight);
301
+ parent.notify('draw', { prop: 'drawImage', onPropertyChange: false });
297
302
  for (var i = 0, len = parent.objColl.length; i < len; i++) {
298
303
  parent.objColl[i].shapeFlip = '';
299
304
  }
@@ -313,8 +318,7 @@ var Crop = /** @class */ (function () {
313
318
  parent.notify('draw', { prop: 'setDestPoints', onPropertyChange: false });
314
319
  parent.notify('draw', { prop: 'currTransState', onPropertyChange: false,
315
320
  value: { type: 'initial', isPreventDestination: null, context: null, isPreventCircleCrop: null } });
316
- parent.notify('filter', { prop: 'updateBrightFilter', onPropertyChange: false });
317
- this.lowerContext.drawImage(parent.baseImg, parent.img.srcLeft, parent.img.srcTop, parent.img.srcWidth, parent.img.srcHeight, parent.img.destLeft, parent.img.destTop, parent.img.destWidth, parent.img.destHeight);
321
+ parent.notify('draw', { prop: 'drawImage', onPropertyChange: false });
318
322
  this.lowerContext.filter = temp;
319
323
  parent.notify('draw', { prop: 'setRotateZoom', onPropertyChange: false, value: { isRotateZoom: false } });
320
324
  parent.notify('draw', { prop: 'currTransState', onPropertyChange: false,
@@ -434,12 +438,13 @@ var Crop = /** @class */ (function () {
434
438
  };
435
439
  Crop.prototype.setCurrSelPoints = function (isSetDimension) {
436
440
  var parent = this.parent;
441
+ parent.allowDownScale = false;
437
442
  var destPoint = this.cropDestPoints;
438
443
  var filter = this.lowerContext.filter;
439
444
  parent.img.srcLeft = 0;
440
445
  parent.img.srcTop = 0;
441
- parent.img.srcWidth = parent.baseImg.width;
442
- parent.img.srcHeight = parent.baseImg.height;
446
+ parent.img.srcWidth = parent.baseImgCanvas.width;
447
+ parent.img.srcHeight = parent.baseImgCanvas.height;
443
448
  parent.img.destLeft = destPoint.startX;
444
449
  parent.img.destTop = destPoint.startY;
445
450
  parent.img.destWidth = destPoint.width;
@@ -461,8 +466,7 @@ var Crop = /** @class */ (function () {
461
466
  parent.img.destLeft += parent.panPoint.totalPannedInternalPoint.x;
462
467
  parent.img.destTop += parent.panPoint.totalPannedInternalPoint.y;
463
468
  }
464
- parent.notify('filter', { prop: 'updateBrightFilter', onPropertyChange: false });
465
- this.lowerContext.drawImage(parent.baseImg, parent.img.srcLeft, parent.img.srcTop, parent.img.srcWidth, parent.img.srcHeight, parent.img.destLeft, parent.img.destTop, parent.img.destWidth, parent.img.destHeight);
469
+ parent.notify('draw', { prop: 'drawImage', onPropertyChange: false });
466
470
  this.lowerContext.filter = filter;
467
471
  parent.notify('draw', { prop: 'currTransState', onPropertyChange: false,
468
472
  value: { type: 'reverse', isPreventDestination: null, context: null, isPreventCircleCrop: true } });
@@ -508,7 +512,12 @@ var Crop = /** @class */ (function () {
508
512
  parent.activeObj = extend({}, actObj, null, true);
509
513
  var activeObj = extend({}, parent.activeObj, null, true);
510
514
  parent.notify('shape', { prop: 'refreshActiveObj', onPropertyChange: false });
511
- this.panToSelRangle();
515
+ parent.currSelectionPoint = null;
516
+ parent.isCircleCrop = false;
517
+ if (parent.transform.degree !== 0) {
518
+ parent.notify('transform', { prop: 'drawPannedImage', value: { xDiff: 0, yDiff: 0 } });
519
+ parent.panPoint.currentPannedPoint = { x: 0, y: 0 };
520
+ }
512
521
  parent.objColl = cropObjColl;
513
522
  parent.pointColl = cropPointColl;
514
523
  parent.freehandCounter = parent.pointColl.length;
@@ -520,7 +529,6 @@ var Crop = /** @class */ (function () {
520
529
  parent.notify('freehand-draw', { prop: 'updateFHDColl', onPropertyChange: false });
521
530
  parent.notify('shape', { prop: 'zoomObjColl', onPropertyChange: false, value: { isPreventApply: null } });
522
531
  parent.notify('freehand-draw', { prop: 'zoomFHDColl', onPropertyChange: false, value: { isPreventApply: null } });
523
- parent.currSelectionPoint = null;
524
532
  if (parent.transform.degree === 0) {
525
533
  parent.notify('transform', { prop: 'drawPannImage', onPropertyChange: false,
526
534
  value: { point: { x: 0, y: 0 } } });
@@ -552,8 +560,6 @@ var Crop = /** @class */ (function () {
552
560
  };
553
561
  Crop.prototype.panToSelRangle = function (isReverse) {
554
562
  var parent = this.parent;
555
- var obj = extend({}, parent.currSelectionPoint, null, true);
556
- parent.currSelectionPoint = null;
557
563
  var panX = parent.transform.degree !== 0 ?
558
564
  isReverse ? -parent.cropObj.totalPannedClientPoint.x : parent.cropObj.totalPannedClientPoint.x : 0;
559
565
  var panY = parent.transform.degree !== 0 ?
@@ -563,7 +569,6 @@ var Crop = /** @class */ (function () {
563
569
  parent.notify('transform', { prop: 'drawPannedImage', value: { xDiff: panX, yDiff: panY } });
564
570
  parent.panPoint.currentPannedPoint = { x: 0, y: 0 };
565
571
  }
566
- parent.currSelectionPoint = obj;
567
572
  };
568
573
  Crop.prototype.cropCircle = function (context, isSave, isFlip) {
569
574
  var parent = this.parent;
@@ -571,6 +576,8 @@ var Crop = /** @class */ (function () {
571
576
  parent.notify('draw', { prop: 'setTransform', onPropertyChange: false,
572
577
  value: { context: context, value: parent.transform.currFlipState, isReverse: null } });
573
578
  }
579
+ var temp = context.filter;
580
+ context.filter = 'none';
574
581
  context.globalCompositeOperation = 'destination-in';
575
582
  context.beginPath();
576
583
  var centerX = isNullOrUndefined(isSave) ? parent.img.destLeft + (parent.img.destWidth / 2) : context.canvas.width / 2;
@@ -582,6 +589,7 @@ var Crop = /** @class */ (function () {
582
589
  context.restore();
583
590
  context.globalCompositeOperation = 'source-over';
584
591
  parent.currObjType.isActiveObj = parent.isCircleCrop = true;
592
+ context.filter = temp;
585
593
  if (isFlip && parent.transform.currFlipState !== '') {
586
594
  parent.notify('draw', { prop: 'setTransform', onPropertyChange: false,
587
595
  value: { context: context, value: parent.transform.currFlipState, isReverse: null } });
@@ -722,10 +730,16 @@ var Crop = /** @class */ (function () {
722
730
  y: parent.activeObj.activePoint.startY }, endPoint: { x: parent.activeObj.activePoint.endX,
723
731
  y: parent.activeObj.activePoint.endY }, preventScaling: false };
724
732
  if (!object_1['isCropToolbar'] && isBlazor() && parent.events && parent.events.cropping.hasDelegate === true) {
725
- /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
726
- parent.dotNetRef.invokeMethodAsync('CropEventAsync', 'OnCrop', transitionArgs).then(function (args) {
727
- _this.cropEvent(args, obj, object_1);
728
- });
733
+ if (parent.currentToolbar == 'resize-toolbar') {
734
+ parent.dotNetRef.invokeMethodAsync('CropEventAsync', 'OnCrop', transitionArgs);
735
+ this.cropEvent(transitionArgs, obj, object_1);
736
+ }
737
+ else {
738
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
739
+ parent.dotNetRef.invokeMethodAsync('CropEventAsync', 'OnCrop', transitionArgs).then(function (args) {
740
+ _this.cropEvent(args, obj, object_1);
741
+ });
742
+ }
729
743
  }
730
744
  else {
731
745
  if (!object_1['isCropToolbar']) {
@@ -769,11 +783,14 @@ var Crop = /** @class */ (function () {
769
783
  }
770
784
  parent.notify('transform', { prop: 'setCropDimension', onPropertyChange: false,
771
785
  value: { width: parent.cropObj.destPoints.width, height: parent.cropObj.destPoints.height } });
772
- if (!isBlazor() && !object['isCropToolbar']) {
786
+ var aspectIcon = this.parent.element.querySelector('#' + this.parent.element.id + '_aspectratio');
787
+ var nonAspectIcon = this.parent.element.querySelector('#' + this.parent.element.id + '_nonaspectratio');
788
+ if (!isBlazor() && !object['isCropToolbar'] && (isNullOrUndefined(aspectIcon) && isNullOrUndefined(nonAspectIcon))) {
773
789
  parent.notify('toolbar', { prop: 'refresh-toolbar', onPropertyChange: false, value: { type: 'main',
774
790
  isApplyBtn: false, isCropping: false, isZooming: null, cType: null } });
791
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
775
792
  }
776
- else if (!object['isCropToolbar']) {
793
+ else if (!object['isCropToolbar'] && this.parent.currentToolbar !== 'resize-toolbar') {
777
794
  this.parent.updateToolbar(this.parent.element, 'imageLoaded');
778
795
  }
779
796
  }
@@ -784,12 +801,12 @@ var Crop = /** @class */ (function () {
784
801
  var widthRatio;
785
802
  var heightRatio;
786
803
  if (parent.transform.degree === 0 || parent.transform.degree % 180 === 0) {
787
- widthRatio = (dimension ? dimension.width : parent.baseImg.width) / parent.img.destWidth;
788
- heightRatio = (dimension ? dimension.height : parent.baseImg.height) / parent.img.destHeight;
804
+ widthRatio = (dimension ? dimension.width : parent.baseImgCanvas.width) / parent.img.destWidth;
805
+ heightRatio = (dimension ? dimension.height : parent.baseImgCanvas.height) / parent.img.destHeight;
789
806
  }
790
807
  else {
791
- widthRatio = (dimension ? dimension.height : parent.baseImg.height) / parent.img.destWidth;
792
- heightRatio = (dimension ? dimension.width : parent.baseImg.width) / parent.img.destHeight;
808
+ widthRatio = (dimension ? dimension.height : parent.baseImgCanvas.height) / parent.img.destWidth;
809
+ heightRatio = (dimension ? dimension.width : parent.baseImgCanvas.width) / parent.img.destHeight;
793
810
  }
794
811
  if (obj) {
795
812
  obj['width'] = widthRatio;
@@ -39,7 +39,11 @@ export declare class Draw {
39
39
  private inputElem;
40
40
  private isFileChanged;
41
41
  private isNewPath;
42
+ private isResizeSelect;
42
43
  private arrowDimension;
44
+ private tempFrame;
45
+ private origDim;
46
+ private isImageApply;
43
47
  constructor(parent: ImageEditor);
44
48
  destroy(): void;
45
49
  private addEventListener;
@@ -48,6 +52,7 @@ export declare class Draw {
48
52
  getModuleName(): string;
49
53
  private updatePrivateVariables;
50
54
  private reset;
55
+ private drawImage;
51
56
  private drawObject;
52
57
  private rotateContext;
53
58
  private setDragLimit;
@@ -73,8 +78,10 @@ export declare class Draw {
73
78
  private arrowCircle;
74
79
  private arrowCircleSolid;
75
80
  private arrowBar;
81
+ private shapeImage;
76
82
  private shapeText;
77
83
  private updateActPoint;
84
+ private rotateImage;
78
85
  private rotateText;
79
86
  private textFlipDegree;
80
87
  private clearOuterCanvas;
@@ -87,7 +94,9 @@ export declare class Draw {
87
94
  private renderImage;
88
95
  private imageOnLoad;
89
96
  private errorLoading;
97
+ private updateBaseImgCanvas;
90
98
  private updateCanvas;
99
+ private resetFrameZoom;
91
100
  private performCancel;
92
101
  private cancelItems;
93
102
  private cancelPen;
@@ -121,4 +130,11 @@ export declare class Draw {
121
130
  private moveToSelectionRange;
122
131
  private isSelectionBiggerThanCanvas;
123
132
  private isSelectionOutsideCanvas;
133
+ private downScaleImgCanvas;
134
+ private downScale;
135
+ private drawImgToCtx;
136
+ private getFrameColor;
137
+ private applyFrame;
138
+ private triggerFrameChange;
139
+ private setFrameObj;
124
140
  }