Skip to content

Commit 986a32b

Browse files
added 11.6.3
1 parent 50ad8d5 commit 986a32b

File tree

5 files changed

+23
-17
lines changed

5 files changed

+23
-17
lines changed

SimpleHTMLApp/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Acuant JavaScript Web SDK v11.6.2
1+
# Acuant JavaScript Web SDK v11.6.3
22

33
**April 2022**
44

SimpleHTMLApp/webSdk/dist/AcuantCamera.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ var AcuantCameraUI = (function () {
102102
}
103103
return minTime < DETECT_TIME_THRESHOLD;
104104
}
105-
106105
}
107106

108107
function handleLiveCapture(response, captureCb){
@@ -254,16 +253,21 @@ var AcuantCameraUI = (function () {
254253

255254
if (showBackRect) {
256255
uiContext.fillStyle = "rgba(0, 0, 0, 0.5)";
257-
uiContext.fillRect(x - offsetY, y + offsetY, measured.width + offsetX, -(Math.max(dimension.width, dimension.height) * 0.05));
256+
uiContext.fillRect(
257+
Math.round(x - offsetY),
258+
Math.round(y + offsetY),
259+
Math.round(measured.width + offsetX),
260+
-Math.round((Math.max(dimension.width, dimension.height) * 0.05))
261+
);
258262
}
259263

260264
uiContext.font = (Math.ceil(Math.max(dimension.width, dimension.height) * fontWeight) || 0) + "px Sans-serif";
261265
uiContext.fillStyle = color;
262266
uiContext.fillText(text, x, y);
263267
updateUiStateTextElement(text);
264-
uiContext.restore();
265268
}
266269

270+
// For screen readers
267271
const updateUiStateTextElement = (text) => {
268272
if (!uiStateTextElement) {
269273
uiStateTextElement = document.createElement('p');
@@ -395,10 +399,10 @@ var AcuantCameraUI = (function () {
395399
if (onDetectedResult && onDetectedResult.points && onDetectedResult.points.length === 4) {
396400
uiContext.beginPath();
397401

398-
uiContext.moveTo(onDetectedResult.points[0].x, onDetectedResult.points[0].y);
402+
uiContext.moveTo(Math.round(onDetectedResult.points[0].x), Math.round(onDetectedResult.points[0].y));
399403

400404
for (var i = 1; i < onDetectedResult.points.length; i++) {
401-
uiContext.lineTo(onDetectedResult.points[i].x, onDetectedResult.points[i].y);
405+
uiContext.lineTo(Math.round(onDetectedResult.points[i].x), Math.round(onDetectedResult.points[i].y));
402406
}
403407
uiContext.fillStyle = style;
404408
uiContext.strokeStyle = "rgba(0, 0, 0, 0)";
@@ -409,10 +413,12 @@ var AcuantCameraUI = (function () {
409413

410414
function drawCorner(point, offsetX, offsetY) {
411415
uiContext.beginPath();
412-
uiContext.moveTo(point.x, point.y);
413-
uiContext.lineTo(point.x + offsetX, point.y)
414-
uiContext.moveTo(point.x, point.y);
415-
uiContext.lineTo(point.x, point.y + offsetY);
416+
const roundedX = Math.round(point.x);
417+
const roundedY = Math.round(point.y);
418+
uiContext.moveTo(roundedX, roundedY);
419+
uiContext.lineTo(Math.round(roundedX + offsetX), roundedY)
420+
uiContext.moveTo(roundedX, roundedY);
421+
uiContext.lineTo(roundedX, Math.round(roundedY + offsetY));
416422
uiContext.stroke();
417423
}
418424

@@ -1434,7 +1440,7 @@ var AcuantCamera = (function () {
14341440
"capturetype": capType
14351441
}
14361442
});
1437-
return AcuantJavascriptWebSdk.addMetadata(base64Img, { imageDescription, dateTimeOriginal: Date().toString() })
1443+
return AcuantJavascriptWebSdk.addMetadata(base64Img, { imageDescription, dateTimeOriginal: new Date().toUTCString() })
14381444
}
14391445

14401446
function getBrowserVersion(){

0 commit comments

Comments
 (0)