@syncfusion/ej2-image-editor 20.3.48 → 20.3.50
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/CHANGELOG.md +8 -0
- package/dist/ej2-image-editor.umd.min.js +2 -2
- package/dist/ej2-image-editor.umd.min.js.map +1 -1
- package/dist/es6/ej2-image-editor.es2015.js +162 -2
- package/dist/es6/ej2-image-editor.es2015.js.map +1 -1
- package/dist/es6/ej2-image-editor.es5.js +162 -2
- package/dist/es6/ej2-image-editor.es5.js.map +1 -1
- package/dist/global/ej2-image-editor.min.js +2 -2
- package/dist/global/ej2-image-editor.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +10 -10
- package/src/image-editor/image-editor-model.d.ts +93 -0
- package/src/image-editor/image-editor.d.ts +184 -0
- package/src/image-editor/image-editor.js +162 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 20.3.
|
|
3
|
+
* version : 20.3.50
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2020. 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@20.3.
|
|
3
|
+
"_id": "@syncfusion/ej2-image-editor@20.3.48",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-wiorIhe8Z3pnWog2Pj0FgkCtduL1PYYRBCGoMOlpMKfFObs06BZvKHOuoW84LvK84Z6DluTEExS6iEGap4ByiQ==",
|
|
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": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-20.3.
|
|
27
|
-
"_shasum": "
|
|
26
|
+
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-image-editor/-/ej2-image-editor-20.3.48.tgz",
|
|
27
|
+
"_shasum": "00e57bec580b475a0afdee744e70de4dfd3c8053",
|
|
28
28
|
"_spec": "@syncfusion/ej2-image-editor@*",
|
|
29
29
|
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",
|
|
30
30
|
"author": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
},
|
|
33
33
|
"bundleDependencies": false,
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@syncfusion/ej2-base": "~20.3.
|
|
36
|
-
"@syncfusion/ej2-buttons": "~20.3.
|
|
37
|
-
"@syncfusion/ej2-inputs": "~20.3.
|
|
38
|
-
"@syncfusion/ej2-navigations": "~20.3.
|
|
39
|
-
"@syncfusion/ej2-popups": "~20.3.
|
|
35
|
+
"@syncfusion/ej2-base": "~20.3.50",
|
|
36
|
+
"@syncfusion/ej2-buttons": "~20.3.50",
|
|
37
|
+
"@syncfusion/ej2-inputs": "~20.3.50",
|
|
38
|
+
"@syncfusion/ej2-navigations": "~20.3.50",
|
|
39
|
+
"@syncfusion/ej2-popups": "~20.3.50",
|
|
40
40
|
"@syncfusion/ej2-splitbuttons": "~20.3.47"
|
|
41
41
|
},
|
|
42
42
|
"deprecated": false,
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/imageeditor"
|
|
70
70
|
},
|
|
71
71
|
"typings": "index.d.ts",
|
|
72
|
-
"version": "20.3.
|
|
72
|
+
"version": "20.3.50",
|
|
73
73
|
"sideEffects": false
|
|
74
74
|
}
|
|
@@ -105,6 +105,99 @@ export interface ImageEditorModel {
|
|
|
105
105
|
*/
|
|
106
106
|
width?: string;
|
|
107
107
|
|
|
108
|
+
/**
|
|
109
|
+
* Gets or sets the background color of the component.
|
|
110
|
+
* The background color of the component that accepts hex value, rgb and text (like 'red'). The default value is ''.
|
|
111
|
+
*
|
|
112
|
+
* @default ''
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
backgroundColor?: string;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Gets or sets the background image for the component.
|
|
119
|
+
* An image that used to fill the background of the component. The default value is ''.
|
|
120
|
+
*
|
|
121
|
+
* @default ''
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
backgroundImage?: string;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Gets or sets whether to prevent the interaction in signature component.
|
|
128
|
+
* True, if the signature component is read only state where the user interaction is prevented. The default value is false.
|
|
129
|
+
*
|
|
130
|
+
* @default false
|
|
131
|
+
* @private
|
|
132
|
+
*/
|
|
133
|
+
isReadOnly?: boolean;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Gets or sets whether to save the signature along with Background Color and background Image while saving.
|
|
137
|
+
* True, if signature component to save with background. The default value is true.
|
|
138
|
+
*
|
|
139
|
+
* @default true
|
|
140
|
+
* @private
|
|
141
|
+
*/
|
|
142
|
+
saveWithBackground?: boolean;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Gets or sets the stroke color of the signature.
|
|
146
|
+
* The color of the signature stroke that accepts hex value, rgb and text (like 'red'). The default value is "#000000".
|
|
147
|
+
*
|
|
148
|
+
* @default '#000000'
|
|
149
|
+
* @private
|
|
150
|
+
*/
|
|
151
|
+
strokeColor?: string;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Gets or sets the minimum stroke width for signature.
|
|
155
|
+
* The signature component calculates stroke width based on Velocity, MinStrokeWidth and MaxStrokeWidth.
|
|
156
|
+
* The minimum width of stroke. The default value is 0.5.
|
|
157
|
+
*
|
|
158
|
+
* @default 0.5
|
|
159
|
+
* @private
|
|
160
|
+
*/
|
|
161
|
+
minStrokeWidth?: number;
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* Gets or sets the maximum stroke width for signature.
|
|
165
|
+
* The signature component calculates stroke width based on Velocity, MinStrokeWidth and MaxStrokeWidth.
|
|
166
|
+
* The maximum width of stroke. The default value is 2.0.
|
|
167
|
+
*
|
|
168
|
+
* @default 2
|
|
169
|
+
* @private
|
|
170
|
+
*/
|
|
171
|
+
maxStrokeWidth?: number;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Gets or sets the velocity to calculate the stroke thickness based on the pressure of the contact on the digitizer surface.
|
|
175
|
+
* The Signature component calculates stroke thickness based on Velocity, MinStrokeWidth and MaxStrokeWidth.
|
|
176
|
+
* The default value is 0.7.
|
|
177
|
+
*
|
|
178
|
+
* @default 0.7
|
|
179
|
+
* @private
|
|
180
|
+
*/
|
|
181
|
+
velocity?: number;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Specifies the Signature in RTL mode that displays the content in the right-to-left direction.
|
|
185
|
+
*
|
|
186
|
+
* @default false
|
|
187
|
+
* @private
|
|
188
|
+
*/
|
|
189
|
+
enableRtl?: boolean;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Gets or sets whether to persist component's state between page reloads.
|
|
193
|
+
* True, if the component's state persistence is enabled. The default value is false.
|
|
194
|
+
* Component's property will be stored in browser local storage to persist component's state when page reloads.
|
|
195
|
+
*
|
|
196
|
+
* @default false
|
|
197
|
+
* @private
|
|
198
|
+
*/
|
|
199
|
+
enablePersistence?: boolean;
|
|
200
|
+
|
|
108
201
|
/**
|
|
109
202
|
* Triggers before an image is saved.
|
|
110
203
|
*
|
|
@@ -183,6 +183,95 @@ export declare class ImageEditor extends SignatureBase implements INotifyPropert
|
|
|
183
183
|
* default 100%
|
|
184
184
|
*/
|
|
185
185
|
width: string;
|
|
186
|
+
/**
|
|
187
|
+
* Gets or sets the background color of the component.
|
|
188
|
+
* The background color of the component that accepts hex value, rgb and text (like 'red'). The default value is ''.
|
|
189
|
+
*
|
|
190
|
+
* @default ''
|
|
191
|
+
* @private
|
|
192
|
+
*/
|
|
193
|
+
backgroundColor: string;
|
|
194
|
+
/**
|
|
195
|
+
* Gets or sets the background image for the component.
|
|
196
|
+
* An image that used to fill the background of the component. The default value is ''.
|
|
197
|
+
*
|
|
198
|
+
* @default ''
|
|
199
|
+
* @private
|
|
200
|
+
*/
|
|
201
|
+
backgroundImage: string;
|
|
202
|
+
/**
|
|
203
|
+
* Gets or sets whether to prevent the interaction in signature component.
|
|
204
|
+
* True, if the signature component is read only state where the user interaction is prevented. The default value is false.
|
|
205
|
+
*
|
|
206
|
+
* @default false
|
|
207
|
+
* @private
|
|
208
|
+
*/
|
|
209
|
+
isReadOnly: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Gets or sets whether to save the signature along with Background Color and background Image while saving.
|
|
212
|
+
* True, if signature component to save with background. The default value is true.
|
|
213
|
+
*
|
|
214
|
+
* @default true
|
|
215
|
+
* @private
|
|
216
|
+
*/
|
|
217
|
+
saveWithBackground: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Gets or sets the stroke color of the signature.
|
|
220
|
+
* The color of the signature stroke that accepts hex value, rgb and text (like 'red'). The default value is "#000000".
|
|
221
|
+
*
|
|
222
|
+
* @default '#000000'
|
|
223
|
+
* @private
|
|
224
|
+
*/
|
|
225
|
+
strokeColor: string;
|
|
226
|
+
/**
|
|
227
|
+
* Gets or sets the minimum stroke width for signature.
|
|
228
|
+
* The signature component calculates stroke width based on Velocity, MinStrokeWidth and MaxStrokeWidth.
|
|
229
|
+
* The minimum width of stroke. The default value is 0.5.
|
|
230
|
+
*
|
|
231
|
+
* @default 0.5
|
|
232
|
+
* @private
|
|
233
|
+
*/
|
|
234
|
+
minStrokeWidth: number;
|
|
235
|
+
/**
|
|
236
|
+
* Gets or sets the maximum stroke width for signature.
|
|
237
|
+
* The signature component calculates stroke width based on Velocity, MinStrokeWidth and MaxStrokeWidth.
|
|
238
|
+
* The maximum width of stroke. The default value is 2.0.
|
|
239
|
+
*
|
|
240
|
+
* @default 2
|
|
241
|
+
* @private
|
|
242
|
+
*/
|
|
243
|
+
maxStrokeWidth: number;
|
|
244
|
+
/**
|
|
245
|
+
* Gets or sets the velocity to calculate the stroke thickness based on the pressure of the contact on the digitizer surface.
|
|
246
|
+
* The Signature component calculates stroke thickness based on Velocity, MinStrokeWidth and MaxStrokeWidth.
|
|
247
|
+
* The default value is 0.7.
|
|
248
|
+
*
|
|
249
|
+
* @default 0.7
|
|
250
|
+
* @private
|
|
251
|
+
*/
|
|
252
|
+
velocity: number;
|
|
253
|
+
/**
|
|
254
|
+
* Specifies the Signature in RTL mode that displays the content in the right-to-left direction.
|
|
255
|
+
*
|
|
256
|
+
* @default false
|
|
257
|
+
* @private
|
|
258
|
+
*/
|
|
259
|
+
enableRtl: boolean;
|
|
260
|
+
/**
|
|
261
|
+
* Gets or sets whether to persist component's state between page reloads.
|
|
262
|
+
* True, if the component's state persistence is enabled. The default value is false.
|
|
263
|
+
* Component's property will be stored in browser local storage to persist component's state when page reloads.
|
|
264
|
+
*
|
|
265
|
+
* @default false
|
|
266
|
+
* @private
|
|
267
|
+
*/
|
|
268
|
+
enablePersistence: boolean;
|
|
269
|
+
/**
|
|
270
|
+
* Gets or sets the last signature url to maintain the persist state.
|
|
271
|
+
*
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
signatureValue: string;
|
|
186
275
|
/**
|
|
187
276
|
* Triggers before an image is saved.
|
|
188
277
|
*
|
|
@@ -733,6 +822,101 @@ export declare class ImageEditor extends SignatureBase implements INotifyPropert
|
|
|
733
822
|
* @returns {void}.
|
|
734
823
|
*/
|
|
735
824
|
update(): void;
|
|
825
|
+
/**
|
|
826
|
+
* To check whether the undo collection is empty or not.
|
|
827
|
+
*
|
|
828
|
+
* @returns {boolean}.
|
|
829
|
+
* @private
|
|
830
|
+
*/
|
|
831
|
+
canUndo(): boolean;
|
|
832
|
+
/**
|
|
833
|
+
* To check whether the redo collection is empty or not.
|
|
834
|
+
*
|
|
835
|
+
* @returns {boolean}.
|
|
836
|
+
* @private
|
|
837
|
+
*/
|
|
838
|
+
canRedo(): boolean;
|
|
839
|
+
/**
|
|
840
|
+
* Erases all the signature strokes signed by user.
|
|
841
|
+
*
|
|
842
|
+
* @returns {void}.
|
|
843
|
+
* @private
|
|
844
|
+
*/
|
|
845
|
+
clear(): void;
|
|
846
|
+
/**
|
|
847
|
+
* To draw the signature based on the given text, with the font family and font size.
|
|
848
|
+
*
|
|
849
|
+
* @param {string} text - specify text to be drawn as signature.
|
|
850
|
+
* @param {string} fontFamily - specify font family of a signature.
|
|
851
|
+
* @param {number} fontSize - specify font size of a signature.
|
|
852
|
+
*
|
|
853
|
+
* @returns {void}.
|
|
854
|
+
* @private
|
|
855
|
+
*/
|
|
856
|
+
draw(text: string, fontFamily?: string, fontSize?: number): void;
|
|
857
|
+
/**
|
|
858
|
+
* To get the signature as Blob.
|
|
859
|
+
*
|
|
860
|
+
* @param {string} url - specify the url/base 64 string to get blob of the signature.
|
|
861
|
+
* @returns {Blob}.
|
|
862
|
+
* @private
|
|
863
|
+
*/
|
|
864
|
+
getBlob(url: string): Blob;
|
|
865
|
+
/**
|
|
866
|
+
* To check whether the signature is empty or not.
|
|
867
|
+
*
|
|
868
|
+
* @returns {boolean}.
|
|
869
|
+
* @private
|
|
870
|
+
*/
|
|
871
|
+
isEmpty(): boolean;
|
|
872
|
+
/**
|
|
873
|
+
* To load the signature with the given base 64 string, height and width.
|
|
874
|
+
*
|
|
875
|
+
* @param {string} signature - specify the url/base 64 string to be drawn as signature.
|
|
876
|
+
* @param {number} width - specify the width of the loaded signature image.
|
|
877
|
+
* @param {number} height - specify the height of the loaded signature image.
|
|
878
|
+
* @returns {void}.
|
|
879
|
+
* @private
|
|
880
|
+
*/
|
|
881
|
+
load(signature: string, width?: number, height?: number): void;
|
|
882
|
+
/**
|
|
883
|
+
* Undo the last user action.
|
|
884
|
+
*
|
|
885
|
+
* @returns {void}.
|
|
886
|
+
* @private
|
|
887
|
+
*/
|
|
888
|
+
undo(): void;
|
|
889
|
+
/**
|
|
890
|
+
* Redo the last user action.
|
|
891
|
+
*
|
|
892
|
+
* @returns {void}.
|
|
893
|
+
* @private
|
|
894
|
+
*/
|
|
895
|
+
redo(): void;
|
|
896
|
+
/**
|
|
897
|
+
* To save the signature with the given file type and file name.
|
|
898
|
+
*
|
|
899
|
+
* @param {SignatureFileType} type - specify type of the file to be saved a signature.
|
|
900
|
+
* @param {string} fileName - specify name of the file to be saved a signature.
|
|
901
|
+
*
|
|
902
|
+
* @returns {void}.
|
|
903
|
+
* @private
|
|
904
|
+
*/
|
|
905
|
+
save(type?: FileType, fileName?: string): void;
|
|
906
|
+
/**
|
|
907
|
+
* To save the signature as Blob.
|
|
908
|
+
*
|
|
909
|
+
* @returns {Blob}.
|
|
910
|
+
* @private
|
|
911
|
+
*/
|
|
912
|
+
saveAsBlob(): Blob;
|
|
913
|
+
/**
|
|
914
|
+
* Returns the persistence data for component.
|
|
915
|
+
*
|
|
916
|
+
* @returns any.
|
|
917
|
+
* @private
|
|
918
|
+
*/
|
|
919
|
+
getLocalData(): any;
|
|
736
920
|
}
|
|
737
921
|
/**
|
|
738
922
|
* Defines the Image Editor file type.
|
|
@@ -2141,12 +2141,21 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
2141
2141
|
wrapperWidth = this.element.clientWidth;
|
|
2142
2142
|
}
|
|
2143
2143
|
var maxDimension = this.calcMaxDimension(this.baseImg.width, this.baseImg.height);
|
|
2144
|
+
var toolbarHeight = 0;
|
|
2145
|
+
if (!isNullOrUndefined(this.toolbarTemplate) && !isNullOrUndefined(document.querySelector('.e-toolbar'))) {
|
|
2146
|
+
toolbarHeight = document.querySelector('.e-toolbar').clientHeight;
|
|
2147
|
+
maxDimension.width -= toolbarHeight;
|
|
2148
|
+
maxDimension.height -= toolbarHeight;
|
|
2149
|
+
}
|
|
2144
2150
|
this.lowerContext.clearRect(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
|
|
2145
2151
|
this.lowerCanvas.width = this.upperCanvas.width = this.inMemoryCanvas.width = this.baseImg.width;
|
|
2146
2152
|
this.lowerCanvas.height = this.upperCanvas.height = this.inMemoryCanvas.height = this.baseImg.height;
|
|
2147
2153
|
this.lowerCanvas.style.maxWidth = this.upperCanvas.style.maxWidth = maxDimension.width + 'px';
|
|
2148
2154
|
this.lowerCanvas.style.maxHeight = this.upperCanvas.style.maxHeight = maxDimension.height + 'px';
|
|
2149
2155
|
this.lowerCanvas.style.left = this.upperCanvas.style.left = (wrapperWidth - maxDimension.width) / 2 + 1 + 'px';
|
|
2156
|
+
if (!isNullOrUndefined(this.toolbarTemplate)) {
|
|
2157
|
+
this.lowerCanvas.style.left = parseFloat(this.lowerCanvas.style.left) + (toolbarHeight / 2) + 'px';
|
|
2158
|
+
}
|
|
2150
2159
|
if (canvasWrapper) {
|
|
2151
2160
|
this.lowerCanvas.style.top = this.upperCanvas.style.top = (parseFloat(canvasWrapper.style.height) - maxDimension.height - 1) / 2 + 'px';
|
|
2152
2161
|
}
|
|
@@ -6776,7 +6785,9 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
6776
6785
|
(isNullOrUndefined(document.getElementById(this.element.id + '_toolbar')))) {
|
|
6777
6786
|
this.toolbarHeight = 0;
|
|
6778
6787
|
}
|
|
6779
|
-
this.
|
|
6788
|
+
if (isNullOrUndefined(this.toolbarTemplate)) {
|
|
6789
|
+
this.update();
|
|
6790
|
+
}
|
|
6780
6791
|
var type = typeof (data);
|
|
6781
6792
|
if (type === 'string') {
|
|
6782
6793
|
this.imageOnLoad(data);
|
|
@@ -7244,7 +7255,7 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
7244
7255
|
}
|
|
7245
7256
|
this.currObjType.isCustomCrop = false;
|
|
7246
7257
|
var start = { x: x, y: y };
|
|
7247
|
-
this.drawShape('
|
|
7258
|
+
this.drawShape('ellipse', strokeWidth, strokeColor, fillColor, start, radiusX, radiusY);
|
|
7248
7259
|
}
|
|
7249
7260
|
return isEllipse;
|
|
7250
7261
|
};
|
|
@@ -7488,6 +7499,125 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
7488
7499
|
this.lowerContext.clearRect(0, 0, this.lowerCanvas.width, this.lowerCanvas.height);
|
|
7489
7500
|
this.upperContext.clearRect(0, 0, this.upperCanvas.width, this.upperCanvas.height);
|
|
7490
7501
|
};
|
|
7502
|
+
/**
|
|
7503
|
+
* To check whether the undo collection is empty or not.
|
|
7504
|
+
*
|
|
7505
|
+
* @returns {boolean}.
|
|
7506
|
+
* @private
|
|
7507
|
+
*/
|
|
7508
|
+
ImageEditor.prototype.canUndo = function () {
|
|
7509
|
+
return _super.prototype.canUndo.call(this);
|
|
7510
|
+
};
|
|
7511
|
+
/**
|
|
7512
|
+
* To check whether the redo collection is empty or not.
|
|
7513
|
+
*
|
|
7514
|
+
* @returns {boolean}.
|
|
7515
|
+
* @private
|
|
7516
|
+
*/
|
|
7517
|
+
ImageEditor.prototype.canRedo = function () {
|
|
7518
|
+
return _super.prototype.canRedo.call(this);
|
|
7519
|
+
};
|
|
7520
|
+
/**
|
|
7521
|
+
* Erases all the signature strokes signed by user.
|
|
7522
|
+
*
|
|
7523
|
+
* @returns {void}.
|
|
7524
|
+
* @private
|
|
7525
|
+
*/
|
|
7526
|
+
ImageEditor.prototype.clear = function () {
|
|
7527
|
+
_super.prototype.clear.call(this);
|
|
7528
|
+
};
|
|
7529
|
+
/**
|
|
7530
|
+
* To draw the signature based on the given text, with the font family and font size.
|
|
7531
|
+
*
|
|
7532
|
+
* @param {string} text - specify text to be drawn as signature.
|
|
7533
|
+
* @param {string} fontFamily - specify font family of a signature.
|
|
7534
|
+
* @param {number} fontSize - specify font size of a signature.
|
|
7535
|
+
*
|
|
7536
|
+
* @returns {void}.
|
|
7537
|
+
* @private
|
|
7538
|
+
*/
|
|
7539
|
+
ImageEditor.prototype.draw = function (text, fontFamily, fontSize) {
|
|
7540
|
+
_super.prototype.draw.call(this, text, fontFamily, fontSize);
|
|
7541
|
+
};
|
|
7542
|
+
/**
|
|
7543
|
+
* To get the signature as Blob.
|
|
7544
|
+
*
|
|
7545
|
+
* @param {string} url - specify the url/base 64 string to get blob of the signature.
|
|
7546
|
+
* @returns {Blob}.
|
|
7547
|
+
* @private
|
|
7548
|
+
*/
|
|
7549
|
+
ImageEditor.prototype.getBlob = function (url) {
|
|
7550
|
+
return _super.prototype.getBlob.call(this, url);
|
|
7551
|
+
};
|
|
7552
|
+
/**
|
|
7553
|
+
* To check whether the signature is empty or not.
|
|
7554
|
+
*
|
|
7555
|
+
* @returns {boolean}.
|
|
7556
|
+
* @private
|
|
7557
|
+
*/
|
|
7558
|
+
ImageEditor.prototype.isEmpty = function () {
|
|
7559
|
+
return _super.prototype.isEmpty.call(this);
|
|
7560
|
+
};
|
|
7561
|
+
/**
|
|
7562
|
+
* To load the signature with the given base 64 string, height and width.
|
|
7563
|
+
*
|
|
7564
|
+
* @param {string} signature - specify the url/base 64 string to be drawn as signature.
|
|
7565
|
+
* @param {number} width - specify the width of the loaded signature image.
|
|
7566
|
+
* @param {number} height - specify the height of the loaded signature image.
|
|
7567
|
+
* @returns {void}.
|
|
7568
|
+
* @private
|
|
7569
|
+
*/
|
|
7570
|
+
ImageEditor.prototype.load = function (signature, width, height) {
|
|
7571
|
+
_super.prototype.load.call(this, signature, width, height);
|
|
7572
|
+
};
|
|
7573
|
+
/**
|
|
7574
|
+
* Undo the last user action.
|
|
7575
|
+
*
|
|
7576
|
+
* @returns {void}.
|
|
7577
|
+
* @private
|
|
7578
|
+
*/
|
|
7579
|
+
ImageEditor.prototype.undo = function () {
|
|
7580
|
+
_super.prototype.undo.call(this);
|
|
7581
|
+
};
|
|
7582
|
+
/**
|
|
7583
|
+
* Redo the last user action.
|
|
7584
|
+
*
|
|
7585
|
+
* @returns {void}.
|
|
7586
|
+
* @private
|
|
7587
|
+
*/
|
|
7588
|
+
ImageEditor.prototype.redo = function () {
|
|
7589
|
+
_super.prototype.redo.call(this);
|
|
7590
|
+
};
|
|
7591
|
+
/**
|
|
7592
|
+
* To save the signature with the given file type and file name.
|
|
7593
|
+
*
|
|
7594
|
+
* @param {SignatureFileType} type - specify type of the file to be saved a signature.
|
|
7595
|
+
* @param {string} fileName - specify name of the file to be saved a signature.
|
|
7596
|
+
*
|
|
7597
|
+
* @returns {void}.
|
|
7598
|
+
* @private
|
|
7599
|
+
*/
|
|
7600
|
+
ImageEditor.prototype.save = function (type, fileName) {
|
|
7601
|
+
_super.prototype.save.call(this, type, fileName);
|
|
7602
|
+
};
|
|
7603
|
+
/**
|
|
7604
|
+
* To save the signature as Blob.
|
|
7605
|
+
*
|
|
7606
|
+
* @returns {Blob}.
|
|
7607
|
+
* @private
|
|
7608
|
+
*/
|
|
7609
|
+
ImageEditor.prototype.saveAsBlob = function () {
|
|
7610
|
+
return _super.prototype.saveAsBlob.call(this);
|
|
7611
|
+
};
|
|
7612
|
+
/**
|
|
7613
|
+
* Returns the persistence data for component.
|
|
7614
|
+
*
|
|
7615
|
+
* @returns any.
|
|
7616
|
+
* @private
|
|
7617
|
+
*/
|
|
7618
|
+
ImageEditor.prototype.getLocalData = function () {
|
|
7619
|
+
return _super.prototype.getLocalData.call(this);
|
|
7620
|
+
};
|
|
7491
7621
|
var ImageEditor_1;
|
|
7492
7622
|
__decorate([
|
|
7493
7623
|
Property('')
|
|
@@ -7510,6 +7640,36 @@ var ImageEditor = /** @class */ (function (_super) {
|
|
|
7510
7640
|
__decorate([
|
|
7511
7641
|
Property('100%')
|
|
7512
7642
|
], ImageEditor.prototype, "width", void 0);
|
|
7643
|
+
__decorate([
|
|
7644
|
+
Property('')
|
|
7645
|
+
], ImageEditor.prototype, "backgroundColor", void 0);
|
|
7646
|
+
__decorate([
|
|
7647
|
+
Property('')
|
|
7648
|
+
], ImageEditor.prototype, "backgroundImage", void 0);
|
|
7649
|
+
__decorate([
|
|
7650
|
+
Property(false)
|
|
7651
|
+
], ImageEditor.prototype, "isReadOnly", void 0);
|
|
7652
|
+
__decorate([
|
|
7653
|
+
Property(true)
|
|
7654
|
+
], ImageEditor.prototype, "saveWithBackground", void 0);
|
|
7655
|
+
__decorate([
|
|
7656
|
+
Property('#000000')
|
|
7657
|
+
], ImageEditor.prototype, "strokeColor", void 0);
|
|
7658
|
+
__decorate([
|
|
7659
|
+
Property(0.5)
|
|
7660
|
+
], ImageEditor.prototype, "minStrokeWidth", void 0);
|
|
7661
|
+
__decorate([
|
|
7662
|
+
Property(2)
|
|
7663
|
+
], ImageEditor.prototype, "maxStrokeWidth", void 0);
|
|
7664
|
+
__decorate([
|
|
7665
|
+
Property(0.7)
|
|
7666
|
+
], ImageEditor.prototype, "velocity", void 0);
|
|
7667
|
+
__decorate([
|
|
7668
|
+
Property(false)
|
|
7669
|
+
], ImageEditor.prototype, "enableRtl", void 0);
|
|
7670
|
+
__decorate([
|
|
7671
|
+
Property(false)
|
|
7672
|
+
], ImageEditor.prototype, "enablePersistence", void 0);
|
|
7513
7673
|
__decorate([
|
|
7514
7674
|
Event()
|
|
7515
7675
|
], ImageEditor.prototype, "beforeSave", void 0);
|