@syncfusion/ej2-inputs 20.4.51 → 20.4.52
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 +12 -0
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +30 -42
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +30 -42
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/common/signature-base.d.ts +3 -23
- package/src/common/signature-base.js +28 -40
- package/src/maskedtextbox/base/mask-base.js +1 -1
- package/src/uploader/uploader.js +1 -1
|
@@ -2947,7 +2947,7 @@ function removeMaskInputValues(event) {
|
|
|
2947
2947
|
function maskInputKeyPressHandler(event) {
|
|
2948
2948
|
if (this.mask && !this.readonly) {
|
|
2949
2949
|
var oldValue = this.element.value;
|
|
2950
|
-
if ((
|
|
2950
|
+
if (!(event.ctrlKey || event.metaKey) || ((event.ctrlKey || event.metaKey) && event.code !== 'KeyA' && event.code !== 'KeyY'
|
|
2951
2951
|
&& event.code !== 'KeyZ' && event.code !== 'KeyX' && event.code !== 'KeyC' && event.code !== 'KeyV')) {
|
|
2952
2952
|
this.maskKeyPress = true;
|
|
2953
2953
|
var key = event.key;
|
|
@@ -9936,7 +9936,7 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
|
|
|
9936
9936
|
for (var selectFileIndex = 0; selectFileIndex < selectedFiles.length; selectFileIndex++) {
|
|
9937
9937
|
var selectedFileData = selectedFiles[selectFileIndex];
|
|
9938
9938
|
for (var fileDataIndex = 0; fileDataIndex < this.filesData.length; fileDataIndex++) {
|
|
9939
|
-
if (this.filesData[fileDataIndex].name === selectedFileData.name) {
|
|
9939
|
+
if (this.filesData[fileDataIndex].name === selectedFileData.name && this.filesData[fileDataIndex].status === selectedFileData.status) {
|
|
9940
9940
|
matchFiles[matchFilesIndex] = this.filesData[fileDataIndex];
|
|
9941
9941
|
++matchFilesIndex;
|
|
9942
9942
|
}
|
|
@@ -13926,7 +13926,8 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
13926
13926
|
_this.clearArray = [];
|
|
13927
13927
|
_this.isBlazor = false;
|
|
13928
13928
|
_this.isResponsive = false;
|
|
13929
|
-
_this.
|
|
13929
|
+
_this.signPointsColl = [];
|
|
13930
|
+
_this.signRatioPointsColl = [];
|
|
13930
13931
|
return _this;
|
|
13931
13932
|
}
|
|
13932
13933
|
/**
|
|
@@ -13998,17 +13999,12 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
13998
13999
|
}
|
|
13999
14000
|
};
|
|
14000
14001
|
// eslint-disable-next-line
|
|
14001
|
-
SignatureBase.prototype.mouseDownHandler = function (e
|
|
14002
|
+
SignatureBase.prototype.mouseDownHandler = function (e) {
|
|
14002
14003
|
if (e.buttons === 1 || e.buttons === 2 || e.type === 'touchstart') {
|
|
14003
14004
|
if (e.type === 'touchstart') {
|
|
14004
14005
|
e.preventDefault();
|
|
14005
14006
|
e.stopPropagation();
|
|
14006
14007
|
}
|
|
14007
|
-
if (canvas) {
|
|
14008
|
-
this.canvasContext = canvas.getContext('2d');
|
|
14009
|
-
this.scale = zoomState;
|
|
14010
|
-
this.panStart = panStart;
|
|
14011
|
-
}
|
|
14012
14008
|
this.beginStroke(e);
|
|
14013
14009
|
this.wireEvents();
|
|
14014
14010
|
}
|
|
@@ -14043,6 +14039,11 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14043
14039
|
this.dotnetRef.invokeMethodAsync('TriggerEventAsync', 'mouseUp');
|
|
14044
14040
|
}
|
|
14045
14041
|
this.signatureValue = this.snapColl[this.incStep];
|
|
14042
|
+
for (var i = 0; i < this.signPointsColl.length; i++) {
|
|
14043
|
+
this.signRatioPointsColl.push({ x: (this.signPointsColl[i].x / this.canvasContext.canvas.width),
|
|
14044
|
+
y: (this.signPointsColl[i].y / this.canvasContext.canvas.height) });
|
|
14045
|
+
}
|
|
14046
|
+
this.signPointsColl = [];
|
|
14046
14047
|
};
|
|
14047
14048
|
SignatureBase.prototype.keyboardHandler = function (e) {
|
|
14048
14049
|
var _this = this;
|
|
@@ -14080,13 +14081,23 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14080
14081
|
this.canvasContext.canvas.width = this.element.offsetWidth;
|
|
14081
14082
|
this.canvasContext.canvas.height = this.element.offsetHeight;
|
|
14082
14083
|
this.canvasContext.scale(1, 1);
|
|
14084
|
+
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
14085
|
+
var pointSize = (this.minStrokeWidth + this.maxStrokeWidth) / 2;
|
|
14086
|
+
for (var i = 0; i < this.signRatioPointsColl.length; i++) {
|
|
14087
|
+
this.arcDraw((this.signRatioPointsColl[i].x * this.canvasContext.canvas.width), (this.signRatioPointsColl[i].y * this.canvasContext.canvas.height), pointSize);
|
|
14088
|
+
}
|
|
14089
|
+
this.signPointsColl = [];
|
|
14090
|
+
this.canvasContext.closePath();
|
|
14091
|
+
this.canvasContext.fill();
|
|
14092
|
+
}
|
|
14093
|
+
else {
|
|
14094
|
+
var restoreImg_1 = new Image();
|
|
14095
|
+
restoreImg_1.src = this.snapColl[this.incStep];
|
|
14096
|
+
restoreImg_1.onload = function () {
|
|
14097
|
+
proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
|
|
14098
|
+
proxy.canvasContext.drawImage(restoreImg_1, 0, 0, proxy.element.width, proxy.element.height);
|
|
14099
|
+
};
|
|
14083
14100
|
}
|
|
14084
|
-
var restoreImg = new Image();
|
|
14085
|
-
restoreImg.src = this.snapColl[this.incStep];
|
|
14086
|
-
restoreImg.onload = function () {
|
|
14087
|
-
proxy.canvasContext.clearRect(0, 0, proxy.element.width, proxy.element.height);
|
|
14088
|
-
proxy.canvasContext.drawImage(restoreImg, 0, 0, proxy.element.width, proxy.element.height);
|
|
14089
|
-
};
|
|
14090
14101
|
};
|
|
14091
14102
|
SignatureBase.prototype.beginStroke = function (e) {
|
|
14092
14103
|
this.refresh();
|
|
@@ -14126,34 +14137,10 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14126
14137
|
SignatureBase.prototype.createPoint = function (e) {
|
|
14127
14138
|
var rect = this.canvasContext.canvas.getBoundingClientRect();
|
|
14128
14139
|
if (e.type === 'mousedown' || e.type === 'mousemove') {
|
|
14129
|
-
|
|
14130
|
-
if (this.canvasRatio === undefined) {
|
|
14131
|
-
return this.point(e.clientX - rect.left, e.clientY - rect.top, new Date().getTime());
|
|
14132
|
-
}
|
|
14133
|
-
// image editor
|
|
14134
|
-
else if (this.scale === 1) {
|
|
14135
|
-
return this.point(((e.clientX - rect.left) * this.canvasRatio.width) / this.scale, ((e.clientY - rect.top) * this.canvasRatio.height) / this.scale, new Date().getTime());
|
|
14136
|
-
}
|
|
14137
|
-
else {
|
|
14138
|
-
return this.point((((e.clientX - rect.left) + ((this.panStart.startX) / this.canvasRatio.width
|
|
14139
|
-
* this.scale)) / this.scale) * this.canvasRatio.width, (((e.clientY - rect.top) + ((this.panStart.startY) / this.canvasRatio.height
|
|
14140
|
-
* this.scale)) / this.scale) * this.canvasRatio.height, new Date().getTime());
|
|
14141
|
-
}
|
|
14140
|
+
return this.point(e.clientX - rect.left, e.clientY - rect.top, new Date().getTime());
|
|
14142
14141
|
}
|
|
14143
14142
|
else {
|
|
14144
|
-
|
|
14145
|
-
if (this.canvasRatio === undefined) {
|
|
14146
|
-
return this.point(e.touches[0].clientX - rect.left, e.touches[0].clientY - rect.top, new Date().getTime());
|
|
14147
|
-
}
|
|
14148
|
-
// image editor
|
|
14149
|
-
else if (this.scale === 1) {
|
|
14150
|
-
return this.point(((e.touches[0].clientX - rect.left) * this.canvasRatio.width) / this.scale, ((e.touches[0].clientY - rect.top) * this.canvasRatio.height) / this.scale, new Date().getTime());
|
|
14151
|
-
}
|
|
14152
|
-
else {
|
|
14153
|
-
return this.point((e.touches[0].clientX - rect.left) + this.panStart.startX / (this.canvasRatio.width
|
|
14154
|
-
* this.scale), (e.touches[0].clientY - rect.top) + this.panStart.startY / (this.canvasRatio.height
|
|
14155
|
-
* this.scale), new Date().getTime());
|
|
14156
|
-
}
|
|
14143
|
+
return this.point(e.touches[0].clientX - rect.left, e.touches[0].clientY - rect.top, new Date().getTime());
|
|
14157
14144
|
}
|
|
14158
14145
|
};
|
|
14159
14146
|
/* Returns the current point corrdinates(x, y) and time.*/
|
|
@@ -14171,7 +14158,6 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14171
14158
|
var isLastPointTooClose = lastPoint ? this.distanceTo(lastPoint) <= this.minDistance : false;
|
|
14172
14159
|
if (!lastPoint || !(lastPoint && isLastPointTooClose)) {
|
|
14173
14160
|
points.push(point);
|
|
14174
|
-
this.imageEditorPointsColl.push(point);
|
|
14175
14161
|
if (points.length > 2) {
|
|
14176
14162
|
if (points.length === 3) {
|
|
14177
14163
|
points.unshift(points[0]);
|
|
@@ -14252,6 +14238,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14252
14238
|
this.isSignatureEmpty = false;
|
|
14253
14239
|
};
|
|
14254
14240
|
SignatureBase.prototype.arcDraw = function (x, y, size) {
|
|
14241
|
+
this.signPointsColl.push({ x: x, y: y });
|
|
14255
14242
|
var context = this.canvasContext;
|
|
14256
14243
|
context.moveTo(x, y);
|
|
14257
14244
|
context.arc(x, y, size, 0, 2 * Math.PI, false);
|
|
@@ -14452,6 +14439,7 @@ var SignatureBase = /** @__PURE__ @class */ (function (_super) {
|
|
|
14452
14439
|
var args = { actionName: 'clear' };
|
|
14453
14440
|
this.canvasContext.clearRect(0, 0, this.canvasContext.canvas.width, this.canvasContext.canvas.height);
|
|
14454
14441
|
this.refresh();
|
|
14442
|
+
this.signRatioPointsColl = [];
|
|
14455
14443
|
this.updateSnapCollection(true);
|
|
14456
14444
|
this.isSignatureEmpty = true;
|
|
14457
14445
|
if (!this.isBlazor) {
|