Skip to content

Commit 2f87b7a

Browse files
committed
remove 'barcodeFormatString_2';
1 parent b3d837a commit 2f87b7a

12 files changed

+13
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
scanner.onFrameRead = results => {
3838
console.log("Barcodes on one frame:");
3939
for (let result of results) {
40-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
40+
const format = result.barcodeFormatString;
4141
console.log(format + ": " + result.barcodeText);
4242
}
4343
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ <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-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
59+
const format = result.barcodeFormatString;
6060
console.log(format + ": " + result.barcodeText);
6161
}
6262
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ <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-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
41+
const format = result.barcodeFormatString;
4242
console.log(format + ": " + result.barcodeText);
4343
}
4444
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <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-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
43+
const format = result.barcodeFormatString;
4444
console.log(format + ": " + result.barcodeText);
4545
}
4646
};

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ <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-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
98+
const format = result.barcodeFormatString;
9999
iptReadonlyLastResult.value = format + ": " + result.barcodeText; // show last txt result
100100
const p = document.createElement('p');
101101
p.appendChild(createEl('span', format + ": "));

2.ui-tweaking/1.read-video-show-result.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ <h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
6969
scanner.onFrameRead = (_results) => {
7070
for (let result of _results) {
7171
let newElements = [];
72-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
72+
const format = result.barcodeFormatString;
7373
newElements.push(createASpan(format + ": "));
7474
newElements.push(createASpan(result.barcodeText, "resultText"));
7575
newElements.push(document.createElement('br'));
@@ -84,7 +84,7 @@ <h1 style="font-size: 1.5em;">Use the Default Built-in UI</h1>
8484
}
8585
};
8686
scanner.onUniqueRead = (txt, result) => {
87-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
87+
const format = result.barcodeFormatString;
8888
document.getElementById('result').value = format + ": " + txt;
8989
document.getElementById('result').focus();
9090
setTimeout(() => {

2.ui-tweaking/2.read-video-no-extra-control.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ <h1 style="font-size: 1.5em;">Hide UI Controls</h1>
6161
try {
6262
let scanner = await (pScanner = pScanner || Dynamsoft.DBR.BarcodeScanner.createInstance());
6363
scanner.onUniqueRead = (txt, result) => {
64-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
64+
const format = result.barcodeFormatString;
6565
document.getElementById('result').value = format + ": " + txt;
6666
document.getElementById('result').focus();
6767
setTimeout(() => {

2.ui-tweaking/3.read-video-with-external-control.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ <h1 style="font-size: 1.5em;">Customized UI</h1>
123123
let scanner = await (pScanner = pScanner || Dynamsoft.DBR.BarcodeScanner.createInstance());
124124
await scanner.setUIElement(document.getElementById('div-ui-container'));
125125
scanner.onUniqueRead = (txt, result) => {
126-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
126+
const format = result.barcodeFormatString;
127127
document.getElementById('result').value = format + ": " + txt;
128128
document.getElementById('result').focus();
129129
setTimeout(() => {

2.ui-tweaking/4.difference-video-size.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ <h1 style="font-size: 1.5em;">Enlarge the Video Stream</h1>
8686
let scanner = await (pScanner = pScanner || Dynamsoft.DBR.BarcodeScanner.createInstance());
8787
await scanner.setUIElement(document.getElementById('div-ui-container'));
8888
scanner.onUniqueRead = (txt, result) => {
89-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
89+
const format = result.barcodeFormatString;
9090
document.getElementById('result').value = format + ": " + txt;
9191
if (fitPage.hidden)
9292
exitFullPage();

2.ui-tweaking/5.read-video-with-custom-default-ui.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ <h1>Customized Default UI</h1>
9090
let scanner = await (pScanner = pScanner || Dynamsoft.DBR.BarcodeScanner.createInstance());
9191
document.getElementById('UIElement').appendChild(scanner.getUIElement());
9292
scanner.onUniqueRead = (txt, result) => {
93-
const format = result.barcodeFormat ? result.barcodeFormatString : result.barcodeFormatString_2;
93+
const format = result.barcodeFormatString;
9494
document.getElementById('result').value = format + ": " + txt;
9595
document.getElementById('result').focus();
9696
setTimeout(() => {

0 commit comments

Comments
 (0)