@syncfusion/ej2-image-editor 31.1.21 → 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.
- package/dist/ej2-image-editor.umd.min.js +3 -3
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +35 -4
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +35 -4
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +3 -3
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +2 -2
- package/package.json +8 -8
- package/src/image-editor/action/shape.d.ts +1 -0
- package/src/image-editor/action/shape.js +20 -2
- package/src/image-editor/base/image-editor.d.ts +1 -0
- package/src/image-editor/base/image-editor.js +15 -2
|
@@ -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
|
/**
|
|
@@ -24396,7 +24420,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
24396
24420
|
* @returns {void}.
|
|
24397
24421
|
*/
|
|
24398
24422
|
undo() {
|
|
24399
|
-
this.
|
|
24423
|
+
this.handlePenActiveState();
|
|
24400
24424
|
this.notify('undo-redo', { prop: 'undo', onPropertyChange: false });
|
|
24401
24425
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
24402
24426
|
}
|
|
@@ -24408,7 +24432,7 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
24408
24432
|
* @returns {void}.
|
|
24409
24433
|
*/
|
|
24410
24434
|
redo() {
|
|
24411
|
-
this.
|
|
24435
|
+
this.handlePenActiveState();
|
|
24412
24436
|
this.notify('undo-redo', { prop: 'redo', onPropertyChange: false });
|
|
24413
24437
|
this.notify('draw', { prop: 'redrawDownScale' });
|
|
24414
24438
|
}
|
|
@@ -27174,6 +27198,13 @@ let ImageEditor = ImageEditor_1 = class ImageEditor extends Component {
|
|
|
27174
27198
|
}
|
|
27175
27199
|
return isRedact;
|
|
27176
27200
|
}
|
|
27201
|
+
handlePenActiveState() {
|
|
27202
|
+
const freehandDrawObj = { freehandDrawSelectedId: null };
|
|
27203
|
+
this.notify('freehand-draw', { prop: 'getFreehandDrawSelectedId', onPropertyChange: false, value: { obj: freehandDrawObj } });
|
|
27204
|
+
if (isNullOrUndefined(freehandDrawObj['freehandDrawSelectedId'])) {
|
|
27205
|
+
this.manageActiveAction();
|
|
27206
|
+
}
|
|
27207
|
+
}
|
|
27177
27208
|
};
|
|
27178
27209
|
__decorate([
|
|
27179
27210
|
Property('')
|