File tree Expand file tree Collapse file tree 12 files changed +13
-15
lines changed
Expand file tree Collapse file tree 12 files changed +13
-15
lines changed Original file line number Diff line number Diff line change 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 } ;
Original file line number Diff line number Diff 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 } ;
Original file line number Diff line number Diff 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 } ;
Original file line number Diff line number Diff 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 } ;
Original file line number Diff line number Diff 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 + ": " ) ) ;
Original file line number Diff line number Diff 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 ( ( ) => {
Original file line number Diff line number Diff 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 ( ( ) => {
Original file line number Diff line number Diff 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 ( ( ) => {
Original file line number Diff line number Diff 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 ( ) ;
Original file line number Diff line number Diff 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 ( ( ) => {
You can’t perform that action at this time.
0 commit comments