@syncfusion/ej2-image-editor 27.2.2 → 27.2.5

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.2.2
3
+ * version : 27.2.5
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@27.1.57",
3
+ "_id": "@syncfusion/ej2-image-editor@27.2.3",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-WzSJDFg8fD2CBvt7/D/aVhqIsDv1ZWa37++ruPZXM+zLM8CEFyq9QnkhUg5UZO7M69vGy5e17jDjaBmDqX2yEg==",
5
+ "_integrity": "sha512-vakrP1C7mO3m0xWdmuSB+dDqk3tdgsJLXwvkkBx8kkST4zLm4BlfEs35biPq7QQAGapcHg8mlY5zE4GhJAlTtg==",
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-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-27.1.57.tgz",
27
- "_shasum": "7752944d8e6078004d132dfdeee981c1951d5fb4",
26
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-27.2.3.tgz",
27
+ "_shasum": "e8a23ddd9e7615dfd1bac7137a0af8fe68078762",
28
28
  "_spec": "@syncfusion/ej2-image-editor@*",
29
29
  "_where": "/jenkins/workspace/elease-automation_release_27.1.1/packages/included",
30
30
  "author": {
@@ -32,11 +32,11 @@
32
32
  },
33
33
  "bundleDependencies": false,
34
34
  "dependencies": {
35
- "@syncfusion/ej2-base": "~27.2.2",
36
- "@syncfusion/ej2-buttons": "~27.2.2",
37
- "@syncfusion/ej2-dropdowns": "~27.2.2",
38
- "@syncfusion/ej2-inputs": "~27.2.2",
39
- "@syncfusion/ej2-navigations": "~27.2.2",
35
+ "@syncfusion/ej2-base": "~27.2.5",
36
+ "@syncfusion/ej2-buttons": "~27.2.4",
37
+ "@syncfusion/ej2-dropdowns": "~27.2.5",
38
+ "@syncfusion/ej2-inputs": "~27.2.4",
39
+ "@syncfusion/ej2-navigations": "~27.2.5",
40
40
  "@syncfusion/ej2-popups": "~27.2.2",
41
41
  "@syncfusion/ej2-splitbuttons": "~27.2.2"
42
42
  },
@@ -68,7 +68,7 @@
68
68
  "url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
69
69
  },
70
70
  "typings": "index.d.ts",
71
- "version": "27.2.2",
71
+ "version": "27.2.5",
72
72
  "sideEffects": false,
73
73
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
74
74
  }
@@ -52,6 +52,7 @@ export declare class Selection {
52
52
  private isMouseDown;
53
53
  private isMouseUp;
54
54
  private mouseWheel;
55
+ private isTransformedShape;
55
56
  constructor(parent: ImageEditor);
56
57
  destroy(): void;
57
58
  private addEventListener;
@@ -166,6 +167,7 @@ export declare class Selection {
166
167
  private deleteItem;
167
168
  private updateFreehandDrawColorChange;
168
169
  private updatePrevShapeSettings;
170
+ private updateTransColl;
169
171
  private getArrowType;
170
172
  private getRectanglePoints;
171
173
  private getTransRotationPoint;
@@ -42,6 +42,7 @@ var Selection = /** @class */ (function () {
42
42
  this.isMouseDown = false;
43
43
  this.isMouseUp = false;
44
44
  this.mouseWheel = 0;
45
+ this.isTransformedShape = false;
45
46
  this.parent = parent;
46
47
  this.addEventListener();
47
48
  }
@@ -322,6 +323,15 @@ var Selection = /** @class */ (function () {
322
323
  case 'redact':
323
324
  this.currentDrawingShape = args.value['shape'];
324
325
  break;
326
+ case 'updateTransColl':
327
+ args.value['obj']['coll'] = this.updateTransColl(args.value['object']);
328
+ break;
329
+ case 'getTransformedShape':
330
+ args.value['obj']['bool'] = this.isTransformedShape;
331
+ break;
332
+ case 'setTransformedShape':
333
+ this.isTransformedShape = args.value['bool'];
334
+ break;
325
335
  }
326
336
  };
327
337
  Selection.prototype.getModuleName = function () {
@@ -373,7 +383,7 @@ var Selection = /** @class */ (function () {
373
383
  this.mouseDown = '';
374
384
  this.isSliderActive = false;
375
385
  this.arrowShape = [ArrowheadType.None, ArrowheadType.SolidArrow];
376
- this.isMouseDown = this.isMouseUp = false;
386
+ this.isMouseDown = this.isMouseUp = this.isTransformedShape = false;
377
387
  };
378
388
  Selection.prototype.performTabAction = function () {
379
389
  var parent = this.parent;
@@ -2993,6 +3003,16 @@ var Selection = /** @class */ (function () {
2993
3003
  else {
2994
3004
  degree = parent.transform.degree - parent.activeObj.shapeDegree;
2995
3005
  }
3006
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
3007
+ var coll = parent.activeObj.rotateFlipColl;
3008
+ if (this.isTransformedShape && coll) {
3009
+ degree = 0;
3010
+ for (var i = 0; i < coll.length; i++) {
3011
+ if (typeof (coll[i]) === 'number') {
3012
+ degree += (coll[i]);
3013
+ }
3014
+ }
3015
+ }
2996
3016
  if (degree < 0) {
2997
3017
  degree = 360 + degree;
2998
3018
  }
@@ -5404,8 +5424,8 @@ var Selection = /** @class */ (function () {
5404
5424
  id: !isNullOrUndefined(currIndex) ? currIndex : null,
5405
5425
  type: parent.toPascalCase(shape),
5406
5426
  startX: startX, startY: startY, width: width, height: height,
5407
- strokeColor: strokeSettings ? strokeSettings.strokeColor : null,
5408
- strokeWidth: strokeSettings ? strokeSettings.strokeWidth : null,
5427
+ strokeColor: strokeSettings ? (shape === 'text' ? strokeSettings.outlineColor : strokeSettings.strokeColor) : null,
5428
+ strokeWidth: strokeSettings ? (shape === 'text' ? strokeSettings.outlineWidth : strokeSettings.strokeWidth) : null,
5409
5429
  fillColor: strokeSettings ? strokeSettings.fillColor : null,
5410
5430
  radius: shape === 'ellipse' ? width / 2 : null,
5411
5431
  length: shape === 'line' || shape === 'arrow' ? width : null,
@@ -5424,13 +5444,34 @@ var Selection = /** @class */ (function () {
5424
5444
  arrowHead: shape === 'arrow' ? this.getArrowType(parent.activeObj.start) : null,
5425
5445
  arrowTail: shape === 'arrow' ? this.getArrowType(parent.activeObj.end) : null,
5426
5446
  points: shape === 'path' ? parent.activeObj.pointColl : null,
5427
- index: parent.activeObj.order
5447
+ index: parent.activeObj.order,
5448
+ transformCollection: shape === 'text' ? this.updateTransColl(parent.activeObj) : null
5428
5449
  };
5429
5450
  if (obj) {
5430
5451
  obj['shapeSettingsObj'] = shapeSettingsObj;
5431
5452
  }
5432
5453
  return shapeSettingsObj;
5433
5454
  };
5455
+ Selection.prototype.updateTransColl = function (object) {
5456
+ var parent = this.parent;
5457
+ var coll;
5458
+ /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
5459
+ var tempColl = object.rotateFlipColl;
5460
+ if (tempColl && tempColl.length > 0) {
5461
+ var value = void 0;
5462
+ coll = [];
5463
+ for (var i = 0; i < tempColl.length; i++) {
5464
+ value = tempColl[i];
5465
+ if (typeof (value) === 'number') {
5466
+ coll.push({ degree: value });
5467
+ }
5468
+ else {
5469
+ coll.push({ flip: parent.toPascalCase(value) });
5470
+ }
5471
+ }
5472
+ }
5473
+ return coll;
5474
+ };
5434
5475
  Selection.prototype.getArrowType = function (type) {
5435
5476
  var typeToArrowType = { 'none': 'None', 'arrow': 'Arrow', 'arrowSolid': 'SolidArrow',
5436
5477
  'circle': 'Circle', 'circleSolid': 'SolidCircle', 'square': 'Square', 'squareSolid': 'SolidSquare', 'bar': 'Bar' };
@@ -34,6 +34,7 @@ export declare class Shape {
34
34
  private setPointCollForLineAndArrow;
35
35
  private prevObjColl;
36
36
  private drawShapeText;
37
+ private setTransformColl;
37
38
  private drawShapeImageEvent;
38
39
  private drawShapeTextEvent;
39
40
  private initializeTextShape;
@@ -46,7 +46,7 @@ var Shape = /** @class */ (function () {
46
46
  this.drawRectangle(args.value['x'], args.value['y'], args.value['width'], args.value['height'], args.value['strokeWidth'], args.value['strokeColor'], args.value['fillColor'], args.value['degree'], args.value['isSelected'], args.value['radius']);
47
47
  break;
48
48
  case 'drawText':
49
- this.drawText(args.value['x'], args.value['y'], args.value['text'], args.value['fontFamily'], args.value['fontSize'], args.value['bold'], args.value['italic'], args.value['color'], args.value['isSelected'], args.value['degree'], args.value['fillColor'], args.value['outlineColor'], args.value['outlineWidth']);
49
+ this.drawText(args.value['x'], args.value['y'], args.value['text'], args.value['fontFamily'], args.value['fontSize'], args.value['bold'], args.value['italic'], args.value['color'], args.value['isSelected'], args.value['degree'], args.value['fillColor'], args.value['outlineColor'], args.value['outlineWidth'], args.value['transformCollection']);
50
50
  break;
51
51
  case 'redrawActObj':
52
52
  this.redrawActObj(args.value['x'], args.value['y'], args.value['isMouseDown']);
@@ -345,8 +345,8 @@ var Shape = /** @class */ (function () {
345
345
  var start = x && y ? { x: x, y: y } : null;
346
346
  this.drawShape('redact', null, null, null, start, width, height, null, null, null, null, null, null, null, type, value);
347
347
  };
348
- Shape.prototype.drawText = function (x, y, text, fontFamily, fontSize, bold, italic, color, isSelected, degree, fillColor, outlineColor, outlineWidth) {
349
- this.drawShapeText(text, fontFamily, fontSize, bold, italic, color, x, y, isSelected, degree, fillColor, outlineColor, outlineWidth);
348
+ Shape.prototype.drawText = function (x, y, text, fontFamily, fontSize, bold, italic, color, isSelected, degree, fillColor, outlineColor, outlineWidth, transformCollection) {
349
+ this.drawShapeText(text, fontFamily, fontSize, bold, italic, color, x, y, isSelected, degree, fillColor, outlineColor, outlineWidth, transformCollection);
350
350
  };
351
351
  Shape.prototype.initializeShape = function (type) {
352
352
  var parent = this.parent;
@@ -532,7 +532,7 @@ var Shape = /** @class */ (function () {
532
532
  value: { obj: selPointCollObj } });
533
533
  this.prevObj.selPointColl = extend([], selPointCollObj['selPointColl'], [], true);
534
534
  };
535
- Shape.prototype.drawShapeText = function (text, fontFamily, fontSize, bold, italic, strokeColor, x, y, isSelected, degree, fillColor, outlineColor, outlineWidth) {
535
+ Shape.prototype.drawShapeText = function (text, fontFamily, fontSize, bold, italic, strokeColor, x, y, isSelected, degree, fillColor, outlineColor, outlineWidth, transformCollection) {
536
536
  var parent = this.parent;
537
537
  if (!parent.disabled && parent.isImageLoaded) {
538
538
  if (parent.currObjType.shape === 'freehanddraw') {
@@ -567,6 +567,17 @@ var Shape = /** @class */ (function () {
567
567
  var width = this.upperContext.measureText(parent.activeObj.textSettings.text).width +
568
568
  parent.activeObj.textSettings.fontSize * 0.5;
569
569
  var height = parent.activeObj.textSettings.fontSize;
570
+ if (text) {
571
+ parent.activeObj.keyHistory = text;
572
+ var maxText = this.getMaxText();
573
+ maxText = maxText ? maxText : parent.activeObj.textSettings.text;
574
+ width = this.upperContext.measureText(maxText).width + parent.activeObj.textSettings.fontSize * 0.5;
575
+ var rows = text.split('\n');
576
+ if (rows.length > 1) {
577
+ height = rows.length * parent.activeObj.textSettings.fontSize;
578
+ height += (fontSize * 0.25);
579
+ }
580
+ }
570
581
  if (!isNullOrUndefined(x) && !isNullOrUndefined(y)) {
571
582
  parent.activeObj.activePoint.startX = x;
572
583
  parent.activeObj.activePoint.startY = y;
@@ -576,6 +587,27 @@ var Shape = /** @class */ (function () {
576
587
  else {
577
588
  this.setCenterPoints(true, width, height);
578
589
  }
590
+ if (transformCollection) {
591
+ parent.notify('selection', { prop: 'setTransformedShape', onPropertyChange: false, value: { bool: true } });
592
+ this.setTransformColl(transformCollection);
593
+ var actObj = parent.activeObj;
594
+ actObj.shapeDegree = 0;
595
+ actObj.shapeFlip = '';
596
+ var tempDegree = 0;
597
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
598
+ var coll = actObj.rotateFlipColl;
599
+ for (var i = 0; i < coll.length; i++) {
600
+ if (typeof (coll[i]) === 'number') {
601
+ tempDegree += coll[i];
602
+ }
603
+ }
604
+ if (tempDegree % 90 === 0 && Math.abs(tempDegree) % 180 === 90) {
605
+ actObj.activePoint.endX = actObj.activePoint.startX + height;
606
+ actObj.activePoint.endY = actObj.activePoint.startY + width;
607
+ actObj.activePoint.width = actObj.activePoint.endX - actObj.activePoint.startX;
608
+ actObj.activePoint.height = actObj.activePoint.endY - actObj.activePoint.startY;
609
+ }
610
+ }
579
611
  var obj = { shapeSettingsObj: {} };
580
612
  parent.notify('selection', { prop: 'updatePrevShapeSettings', onPropertyChange: false, value: { obj: obj } });
581
613
  var shapeSettings = obj['shapeSettingsObj'];
@@ -609,6 +641,20 @@ var Shape = /** @class */ (function () {
609
641
  parent.isPublicMethod = false;
610
642
  }
611
643
  };
644
+ Shape.prototype.setTransformColl = function (transformCollection) {
645
+ var parent = this.parent;
646
+ parent.activeObj.rotateFlipColl = [];
647
+ if (transformCollection) {
648
+ for (var i = 0; i < transformCollection.length; i++) {
649
+ if (transformCollection[i].degree) {
650
+ parent.activeObj.rotateFlipColl.push(transformCollection[i].degree);
651
+ }
652
+ else {
653
+ parent.activeObj.rotateFlipColl.push(transformCollection[i].flip.toLowerCase());
654
+ }
655
+ }
656
+ }
657
+ };
612
658
  Shape.prototype.drawShapeImageEvent = function (shapeChangingArgs, isSelect) {
613
659
  var parent = this.parent;
614
660
  this.updateShapeChangeEventArgs(shapeChangingArgs.currentShapeSettings, shapeChangingArgs.allowShapeOverflow);
@@ -801,9 +847,11 @@ var Shape = /** @class */ (function () {
801
847
  parent.activeObj.activePoint.endX = parent.activeObj.activePoint.startX + parent.activeObj.activePoint.width;
802
848
  parent.activeObj.activePoint.endY = parent.activeObj.activePoint.startY + parent.activeObj.activePoint.height;
803
849
  }
804
- parent.activeObj.strokeSettings.strokeColor = shapeSettings.strokeColor;
850
+ if (parent.activeObj.shape !== 'text') {
851
+ parent.activeObj.strokeSettings.strokeColor = shapeSettings.strokeColor;
852
+ parent.activeObj.strokeSettings.strokeWidth = shapeSettings.strokeWidth;
853
+ }
805
854
  parent.activeObj.strokeSettings.fillColor = shapeSettings.fillColor;
806
- parent.activeObj.strokeSettings.strokeWidth = shapeSettings.strokeWidth;
807
855
  parent.activeObj.opacity = shapeSettings.opacity;
808
856
  parent.activeObj.order = shapeSettings.index;
809
857
  parent.activeObj.preventShapeDragOut = !allowShapeOverflow;
@@ -836,7 +884,11 @@ var Shape = /** @class */ (function () {
836
884
  parent.activeObj.keyHistory = parent.activeObj.textSettings.text = shapeSettings.text;
837
885
  parent.activeObj.textSettings.fontSize = shapeSettings.fontSize;
838
886
  parent.activeObj.strokeSettings.strokeColor = shapeSettings.color;
887
+ parent.activeObj.strokeSettings.outlineColor = shapeSettings.strokeColor;
888
+ parent.activeObj.strokeSettings.outlineWidth = shapeSettings.strokeWidth;
889
+ parent.activeObj.strokeSettings.fillColor = shapeSettings.fillColor;
839
890
  parent.activeObj.textSettings.fontFamily = shapeSettings.fontFamily;
891
+ this.setTransformColl(shapeSettings.transformCollection);
840
892
  if (shapeSettings.degree) {
841
893
  parent.activeObj.rotatedAngle = shapeSettings.degree * (Math.PI / 180);
842
894
  }
@@ -1611,7 +1663,8 @@ var Shape = /** @class */ (function () {
1611
1663
  obj.shapeFlip = parent.transform.currFlipState;
1612
1664
  }
1613
1665
  };
1614
- Shape.prototype.getRotDegOfShape = function (obj) {
1666
+ Shape.prototype.getRotDegOfShape = function (obj, value) {
1667
+ var parent = this.parent;
1615
1668
  var degree;
1616
1669
  if (obj.shapeDegree === 0) {
1617
1670
  degree = this.parent.transform.degree;
@@ -1622,6 +1675,16 @@ var Shape = /** @class */ (function () {
1622
1675
  if (degree < 0) {
1623
1676
  degree = 360 + degree;
1624
1677
  }
1678
+ var transformObj = { bool: false };
1679
+ parent.notify('selection', { prop: 'getTransformedShape', onPropertyChange: false, value: { obj: transformObj } });
1680
+ if (transformObj['bool'] && !value && parent.activeObj.rotateFlipColl) {
1681
+ degree = 0;
1682
+ for (var i = 0; i < parent.activeObj.rotateFlipColl.length; i++) {
1683
+ if (typeof (parent.activeObj.rotateFlipColl[i]) === 'number') {
1684
+ degree += (parent.activeObj.rotateFlipColl[i]);
1685
+ }
1686
+ }
1687
+ }
1625
1688
  return degree;
1626
1689
  };
1627
1690
  Shape.prototype.renderTextArea = function (x, y, actObj) {
@@ -2688,11 +2751,18 @@ var Shape = /** @class */ (function () {
2688
2751
  }
2689
2752
  }
2690
2753
  else if (isTextArea) {
2691
- obj.textSettings.fontRatio = width / parseFloat(parent.textArea.style.fontSize);
2754
+ var transformObj = { bool: false };
2755
+ parent.notify('selection', { prop: 'getTransformedShape', onPropertyChange: false, value: { obj: transformObj } });
2756
+ if (!transformObj['bool'] || degree === 0 || Math.abs(degree) === 180) {
2757
+ obj.textSettings.fontRatio = width / parseFloat(parent.textArea.style.fontSize);
2758
+ }
2759
+ else {
2760
+ obj.textSettings.fontRatio = height / parseFloat(parent.textArea.style.fontSize);
2761
+ }
2692
2762
  }
2693
2763
  };
2694
2764
  Shape.prototype.updateFontSize = function (obj) {
2695
- var degree = this.getRotDegOfShape(obj);
2765
+ var degree = this.getRotDegOfShape(obj, true);
2696
2766
  if (degree === 0 || Math.abs(degree) === 180) {
2697
2767
  obj.textSettings.fontSize = (obj.activePoint.width / obj.textSettings.fontRatio);
2698
2768
  }
@@ -2996,6 +3066,7 @@ var Shape = /** @class */ (function () {
2996
3066
  shapeDetails.startX = obj.activePoint.startX;
2997
3067
  shapeDetails.startY = obj.activePoint.startY;
2998
3068
  shapeDetails.index = obj.order;
3069
+ var transformObj = { coll: null };
2999
3070
  switch (obj.shape) {
3000
3071
  case 'rectangle':
3001
3072
  shapeDetails.width = obj.activePoint.width;
@@ -3034,6 +3105,9 @@ var Shape = /** @class */ (function () {
3034
3105
  shapeDetails.fontSize = obj.textSettings.fontSize;
3035
3106
  shapeDetails.fontFamily = obj.textSettings.fontFamily;
3036
3107
  shapeDetails.color = obj.strokeSettings.strokeColor;
3108
+ shapeDetails.strokeColor = obj.strokeSettings.outlineColor;
3109
+ shapeDetails.fillColor = obj.strokeSettings.fillColor;
3110
+ shapeDetails.strokeWidth = obj.strokeSettings.outlineWidth;
3037
3111
  shapeDetails.fontStyle = [];
3038
3112
  if (obj.textSettings.bold) {
3039
3113
  shapeDetails.fontStyle.push('bold');
@@ -3042,6 +3116,8 @@ var Shape = /** @class */ (function () {
3042
3116
  shapeDetails.fontStyle.push('italic');
3043
3117
  }
3044
3118
  shapeDetails.degree = obj.rotatedAngle * (180 / Math.PI);
3119
+ parent.notify('selection', { prop: 'updateTransColl', onPropertyChange: false, value: { obj: transformObj, object: obj } });
3120
+ shapeDetails.transformCollection = transformObj['coll'];
3045
3121
  break;
3046
3122
  case 'path':
3047
3123
  shapeDetails.strokeColor = obj.strokeSettings.strokeColor;
@@ -3343,6 +3419,9 @@ var Shape = /** @class */ (function () {
3343
3419
  Shape.prototype.getMaxText = function (isTextBox, text, obj) {
3344
3420
  if (isNullOrUndefined(text)) {
3345
3421
  text = isTextBox ? this.parent.textArea.value : this.parent.activeObj.keyHistory;
3422
+ if (!text) {
3423
+ return text;
3424
+ }
3346
3425
  }
3347
3426
  var maxi;
3348
3427
  var rows = text.split('\n');
@@ -1,4 +1,4 @@
1
- import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend } from '@syncfusion/ej2-base';
1
+ import { Component, NotifyPropertyChanges, INotifyPropertyChanged, Property, addClass, removeClass, ModuleDeclaration, extend } from '@syncfusion/ej2-base';
2
2
  import {ComponentModel} from '@syncfusion/ej2-base';
3
3
 
4
4
  /**
@@ -3,7 +3,7 @@ import { EmitType } from '@syncfusion/ej2-base';
3
3
  import { ItemModel, ClickEventArgs } from '@syncfusion/ej2-navigations';
4
4
  import { ChildProperty } from '@syncfusion/ej2-base';
5
5
  import { ImageEditorModel, FinetuneSettingsModel, ZoomSettingsModel, SelectionSettingsModel, FontFamilyModel } from './image-editor-model';
6
- import { SelectionChangeEventArgs, Transition, ArrowheadType, ResizeEventArgs, FrameType, FrameLineStyle, FrameChangeEventArgs, ShapeType, ImageSettings, RedactType } from './../index';
6
+ import { SelectionChangeEventArgs, Transition, ArrowheadType, ResizeEventArgs, FrameType, FrameLineStyle, FrameChangeEventArgs, ShapeType, ImageSettings, RedactType, TransformationCollection } from './../index';
7
7
  import { ZoomEventArgs, PanEventArgs, CropEventArgs, RotateEventArgs, FlipEventArgs, ShapeChangeEventArgs } from './../index';
8
8
  import { ToolbarEventArgs, OpenEventArgs, SaveEventArgs, BeforeSaveEventArgs, Point, ShapeSettings, ImageFilterEventArgs, RedactSettings } from './../index';
9
9
  import { FinetuneEventArgs, QuickAccessToolbarEventArgs, CurrentObject, ImageDimension, TransformValue, PanPoint } from './../index';
@@ -1180,10 +1180,11 @@ export declare class ImageEditor extends Component<HTMLDivElement> implements IN
1180
1180
  * @param {fillColor} fillColor - Specifies the background Color of the text.
1181
1181
  * @param {string} strokeColor - Specifies the outline color of the text annotation.
1182
1182
  * @param {number} strokeWidth - Specifies the outline stroke width of the text annotation.
1183
+ * @param {TransformationCollection[]} transformCollection - Specifies the transform collection of the text annotation.
1183
1184
  * @returns {boolean}.
1184
1185
  *
1185
1186
  */
1186
- drawText(x?: number, y?: number, text?: string, fontFamily?: string, fontSize?: number, bold?: boolean, italic?: boolean, color?: string, isSelected?: boolean, degree?: number, fillColor?: string, strokeColor?: string, strokeWidth?: number): boolean;
1187
+ drawText(x?: number, y?: number, text?: string, fontFamily?: string, fontSize?: number, bold?: boolean, italic?: boolean, color?: string, isSelected?: boolean, degree?: number, fillColor?: string, strokeColor?: string, strokeWidth?: number, transformCollection?: TransformationCollection[]): boolean;
1187
1188
  /**
1188
1189
  * Draw an image as annotation on an image.
1189
1190
  *
@@ -1432,17 +1432,18 @@ var ImageEditor = /** @class */ (function (_super) {
1432
1432
  * @param {fillColor} fillColor - Specifies the background Color of the text.
1433
1433
  * @param {string} strokeColor - Specifies the outline color of the text annotation.
1434
1434
  * @param {number} strokeWidth - Specifies the outline stroke width of the text annotation.
1435
+ * @param {TransformationCollection[]} transformCollection - Specifies the transform collection of the text annotation.
1435
1436
  * @returns {boolean}.
1436
1437
  *
1437
1438
  */
1438
- ImageEditor.prototype.drawText = function (x, y, text, fontFamily, fontSize, bold, italic, color, isSelected, degree, fillColor, strokeColor, strokeWidth) {
1439
+ ImageEditor.prototype.drawText = function (x, y, text, fontFamily, fontSize, bold, italic, color, isSelected, degree, fillColor, strokeColor, strokeWidth, transformCollection) {
1439
1440
  var isText = false;
1440
1441
  var isPointsInRange = this.allowShape(x, y);
1441
1442
  if (!this.disabled && this.isImageLoaded && (isPointsInRange || (isNullOrUndefined(x) && isNullOrUndefined(y)))) {
1442
1443
  isText = true;
1443
1444
  this.notify('shape', { prop: 'drawText', onPropertyChange: false, value: { x: x, y: y, text: text, fontFamily: fontFamily,
1444
1445
  fontSize: fontSize, bold: bold, italic: italic, color: color, isSelected: isSelected, degree: degree, fillColor: fillColor,
1445
- outlineColor: strokeColor, outlineWidth: strokeWidth } });
1446
+ outlineColor: strokeColor, outlineWidth: strokeWidth, transformCollection: transformCollection } });
1446
1447
  this.editCompleted();
1447
1448
  }
1448
1449
  return isText;
@@ -1,4 +1,4 @@
1
- import { FileType, ShapeType, ImageFinetuneOption, ImageFilterOption, FrameType, FrameLineStyle, ArrowheadType, RedactType } from '../index';
1
+ import { FileType, ShapeType, ImageFinetuneOption, ImageFilterOption, FrameType, FrameLineStyle, ArrowheadType, RedactType, Direction } from '../index';
2
2
  import { ItemModel } from '@syncfusion/ej2-navigations';
3
3
  /**
4
4
  * This interface is used to specify settings for image finetuning operations, including minimum and maximum values, as well as default values.
@@ -460,6 +460,10 @@ export interface ShapeSettings {
460
460
  * Returns the border radius of the rectangle annotation.
461
461
  */
462
462
  borderRadius?: number;
463
+ /**
464
+ * Returns the transform collection of the annotations.
465
+ */
466
+ transformCollection?: TransformationCollection[];
463
467
  }
464
468
  /**
465
469
  * The interface which contains the properties for filter option for the image.
@@ -709,6 +713,19 @@ export interface ImageSettings {
709
713
  */
710
714
  backgroundColor: string;
711
715
  }
716
+ /**
717
+ * The Interface which contains the tranformation collection of annotation in Image Editor.
718
+ */
719
+ export interface TransformationCollection {
720
+ /**
721
+ * Returns the transformed degree of annotation.
722
+ */
723
+ degree?: number;
724
+ /**
725
+ * Returns the transformed flip state of annotation.
726
+ */
727
+ flip?: Direction;
728
+ }
712
729
  /**
713
730
  * Interface for active object in the imageEditor.
714
731
  *
@@ -3376,6 +3376,13 @@ var ToolbarModule = /** @class */ (function () {
3376
3376
  parent.notify('draw', { prop: 'drawObject', onPropertyChange: false, value: { canvas: 'duplicate', obj: activeObj,
3377
3377
  isCropRatio: null, points: null, isPreventDrag: true } });
3378
3378
  }
3379
+ var panMoveObj = { panMove: null };
3380
+ parent.notify('transform', { prop: 'getPanMove', onPropertyChange: false,
3381
+ value: { obj: panMoveObj } });
3382
+ if (panMoveObj['panMove']) {
3383
+ parent.notify('transform', { prop: 'drawPannedImage', onPropertyChange: false,
3384
+ value: { xDiff: null, yDiff: null } });
3385
+ }
3379
3386
  };
3380
3387
  ToolbarModule.prototype.updateKBDNavigation = function (type) {
3381
3388
  var parent = this.parent;
@@ -6232,6 +6239,17 @@ var ToolbarModule = /** @class */ (function () {
6232
6239
  fontSizeElem.textContent = (i + 1).toString();
6233
6240
  break;
6234
6241
  }
6242
+ else {
6243
+ if (Math.round(parent.activeObj.textSettings.fontSize) < parseInt(parent.fontSizeColl[0].text, 10)) {
6244
+ fontSizeElem.textContent = '1';
6245
+ break;
6246
+ }
6247
+ else if (Math.round(parent.activeObj.textSettings.fontSize) >
6248
+ parseInt(parent.fontSizeColl[parent.fontSizeColl.length - 1].text, 10)) {
6249
+ fontSizeElem.textContent = ((parent.fontSizeColl.length - 1) + 1).toString();
6250
+ break;
6251
+ }
6252
+ }
6235
6253
  }
6236
6254
  }
6237
6255
  if (boldBtn) {