@syncfusion/ej2-image-editor 31.1.22 → 31.2.2

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.
@@ -14659,6 +14659,7 @@ class Shape {
14659
14659
  this.keyHistory = ''; // text history
14660
14660
  this.preventFrameAnnotation = false;
14661
14661
  this.redactType = 'blur';
14662
+ this.isPublicUpdateShape = false;
14662
14663
  this.parent = parent;
14663
14664
  this.addEventListener();
14664
14665
  }
@@ -14932,6 +14933,9 @@ class Shape {
14932
14933
  case 'setRedactType':
14933
14934
  this.redactType = args.value['redactType'];
14934
14935
  break;
14936
+ case 'setPublicUpdateShape':
14937
+ this.isPublicUpdateShape = args.value['isPublicUpdateShape'];
14938
+ break;
14935
14939
  }
14936
14940
  }
14937
14941
  getModuleName() {
@@ -14958,7 +14962,7 @@ class Shape {
14958
14962
  this.textSettings =
14959
14963
  { text: 'Enter Text', fontFamily: this.parent.fontFamily.default, fontSize: null, fontRatio: null, bold: false, italic: false, underline: false, strikethrough: false };
14960
14964
  this.strokeSettings = { strokeColor: '#fff', fillColor: '', strokeWidth: null, radius: null, outlineColor: '', outlineWidth: null };
14961
- this.preventFrameAnnotation = false;
14965
+ this.preventFrameAnnotation = this.isPublicUpdateShape = false;
14962
14966
  }
14963
14967
  drawEllipse(x, y, radiusX, radiusY, strokeWidth, strokeColor, fillColor, degree, isSelected) {
14964
14968
  this.initializeShape('ellipse');
@@ -15670,7 +15674,7 @@ class Shape {
15670
15674
  }
15671
15675
  parent.notify('selection', { prop: 'setTextSelection', onPropertyChange: false,
15672
15676
  value: { width: width, height: height } });
15673
- if (parent.activeObj.rotatedAngle !== 0) {
15677
+ if (parent.activeObj.rotatedAngle !== 0 && !this.isPublicUpdateShape) {
15674
15678
  const width = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
15675
15679
  const height = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
15676
15680
  let value = '';
@@ -15689,6 +15693,20 @@ class Shape {
15689
15693
  parent.notify('shape', { prop: 'updateFontSize', onPropertyChange: false,
15690
15694
  value: { obj: parent.activeObj } });
15691
15695
  }
15696
+ else if (this.isPublicUpdateShape) {
15697
+ const width = parent.activeObj.activePoint.width - tempActiveObj.activePoint.width;
15698
+ const height = parent.activeObj.activePoint.height - tempActiveObj.activePoint.height;
15699
+ let value = '';
15700
+ if (parent.transform.degree === 0 || parent.transform.degree === 180) {
15701
+ value = 'width';
15702
+ }
15703
+ else if (parent.transform.degree === 90 || parent.transform.degree === 270) {
15704
+ value = 'height';
15705
+ }
15706
+ parent.activeObj.activePoint = extend({}, tempActiveObj.activePoint, {}, true);
15707
+ parent.notify('selection', { prop: 'adjustRotationPoints', onPropertyChange: false, value: { rectangle: parent.activeObj.activePoint,
15708
+ x: width, y: height, angle: parent.activeObj.rotatedAngle, type: 'text', elem: value } });
15709
+ }
15692
15710
  parent.notify('draw', { prop: 'updateActiveObject', onPropertyChange: false, value: { actPoint: parent.activeObj.activePoint, obj: parent.activeObj,
15693
15711
  isMouseMove: null, x: null, y: null } });
15694
15712
  this.updImgRatioForActObj();
@@ -24112,6 +24130,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
24112
24130
  *
24113
24131
  */
24114
24132
  updateShape(setting, isSelected) {
24133
+ if (setting.type.toLowerCase() === 'text') {
24134
+ this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: true } });
24135
+ }
24115
24136
  const obj = { isSelected: false };
24116
24137
  let isTextArea = false;
24117
24138
  const freehandObj = { bool: false };
@@ -24183,6 +24204,9 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
24183
24204
  }
24184
24205
  }
24185
24206
  }
24207
+ if (setting.type.toLowerCase() === 'text') {
24208
+ this.notify('shape', { prop: 'setPublicUpdateShape', onPropertyChange: false, value: { isPublicUpdateShape: false } });
24209
+ }
24186
24210
  return obj['isSelected'];
24187
24211
  }
24188
24212
  /**