Skip to content

Commit 7d8646a

Browse files
author
Cube
authored
Merge pull request #75 from Dynamsoft/_dev
Dev
2 parents c1a5e94 + e90e116 commit 7d8646a

File tree

18 files changed

+32
-17
lines changed

18 files changed

+32
-17
lines changed

1.hello-world/1.hello-world.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
scanner.onFrameRead = results => {
3838
console.log("Barcodes on one frame:");
3939
for (let result of results) {
40-
console.log(result.barcodeFormatString + ": " + result.barcodeText);
40+
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
41+
console.log(format + ": " + result.barcodeText);
4142
}
4243
};
4344
/**

1.hello-world/10.read-video-pwa/helloworld-pwa.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ <h1 style="font-size: 1.5em;">Hello World for PWA</h1>
5656
scanner.onFrameRead = results => {
5757
console.log("Barcodes on one frame:");
5858
for (let result of results) {
59-
console.log(result.barcodeFormatString + ": " + result.barcodeText);
59+
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
60+
console.log(format + ": " + result.barcodeText);
6061
}
6162
};
6263
scanner.onUniqueRead = (txt, result) => {

1.hello-world/11.read-video-requirejs.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ <h1 style="font-size: 1.5em;">Hello World for RequireJS</h1>
3838
scanner.onFrameRead = results => {
3939
console.log("Barcodes on one frame:");
4040
for (let result of results) {
41-
console.log(result.barcodeFormatString + ": " + result.barcodeText);
41+
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
42+
console.log(format + ": " + result.barcodeText);
4243
}
4344
};
4445
scanner.onUniqueRead = (txt, result) => {

1.hello-world/12.read-video-es6.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ <h1 style="font-size: 1.5em;">Hello World for ES6</h1>
4040
scanner.onFrameRead = results => {
4141
console.log("Barcodes on one frame:");
4242
for (let result of results) {
43-
console.log(result.barcodeFormatString + ": " + result.barcodeText);
43+
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
44+
console.log(format + ": " + result.barcodeText);
4445
}
4546
};
4647
/*

1.hello-world/13.read-video-react-ts/src/components/VideoDecode/VideoDecode.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.component-barcode-scanner{width:100%;height:100%;/* min-width:640px; */min-height:480px;background:#eee;position:relative;resize:both;}
2-
.dce-bg-loading{animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
2+
.dce-bg-loading{display:none;animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
33
.dce-bg-camera{display:none;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
44
.dce-video-container{position:absolute;left:0;top:0;width:100%;height:100%;}
55
.dce-scanarea{width:100%;height:100%;position:absolute;left:0;top:0;}

1.hello-world/2.read-an-image.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ <h1 style="font-size: 1.5em;">Read Barcode from Images</h1>
9595
divResults.appendChild(createEl('p', "No Barcode Found!"));
9696
}
9797
for (let result of results) {
98-
iptReadonlyLastResult.value = result.barcodeFormatString + ": " + result.barcodeText; // show last txt result
98+
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
99+
iptReadonlyLastResult.value = format + ": " + result.barcodeText; // show last txt result
99100
const p = document.createElement('p');
100-
p.appendChild(createEl('span', result.barcodeFormatString + ": "));
101+
p.appendChild(createEl('span', format + ": "));
101102
p.appendChild(createEl('span', result.barcodeText, "sp-resultText"));
102103
divResults.appendChild(p);
103104
if (result.barcodeText.indexOf("Attention(exceptionCode") != -1) {

1.hello-world/3.read-video-angular/src/app/barcode-scanner/barcode-scanner.component.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.component-barcode-scanner{width:100%;height:100%;/* min-width:640px; */min-height:480px;background:#eee;position:relative;resize:both;}
2-
.dce-bg-loading{animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
2+
.dce-bg-loading{display:none;animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
33
.dce-bg-camera{display:none;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
44
.dce-video-container{position:absolute;left:0;top:0;width:100%;height:100%;}
55
.dce-scanarea{width:100%;height:100%;position:absolute;left:0;top:0;}

1.hello-world/4.read-video-react/src/components/VideoDecode/VideoDecode.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.component-barcode-scanner{width:100%;height:100%;/* min-width:640px; */min-height:480px;background:#eee;position:relative;resize:both;}
2-
.dce-bg-loading{animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
2+
.dce-bg-loading{display:none;animation:1s linear infinite dce-rotate;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
33
.dce-bg-camera{display:none;width:40%;height:40%;position:absolute;margin:auto;left:0;top:0;right:0;bottom:0;fill:#aaa;}
44
.dce-video-container{position:absolute;left:0;top:0;width:100%;height:100%;}
55
.dce-scanarea{width:100%;height:100%;position:absolute;left:0;top:0;}

1.hello-world/5.read-video-vue/src/components/VideoDecode.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ export default {
117117
}
118118
119119
.dce-bg-loading {
120+
display: none;
120121
animation: 1s linear infinite dce-rotate;
121122
width: 40%;
122123
height: 40%;

1.hello-world/6.read-video-vue3/src/components/VideoDecode.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ export default {
121121
}
122122
123123
.dce-bg-loading {
124+
display: none;
124125
animation: 1s linear infinite dce-rotate;
125126
width: 40%;
126127
height: 40%;

0 commit comments

Comments
 (0)