File tree Expand file tree Collapse file tree 13 files changed +14
-15
lines changed
3.read-video-angular/src/app
src/components/ImageCapture Expand file tree Collapse file tree 13 files changed +14
-15
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ export class ImgDecodeComponent implements OnInit {
3737 async ngOnDestroy ( ) {
3838 if ( this . pReader ) {
3939 ( await this . pReader ) . destroyContext ( ) ;
40- this . pReader = null ;
41- console . log ( 'ImgDecode Component Unmount' ) ;
4240 }
41+ console . log ( 'ImgDecode Component Unmount' ) ;
4342 }
4443}
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export class VideoDecodeComponent implements OnInit {
3838 async ngOnDestroy ( ) {
3939 if ( this . pScanner ) {
4040 ( await this . pScanner ) . destroyContext ( ) ;
41- console . log ( 'BarcodeScanner Component Unmount' ) ;
4241 }
42+ console . log ( 'BarcodeScanner Component Unmount' ) ;
4343 }
4444}
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ function ImageCapture() {
260260 console .log ((item as BarcodeResultItem ).text );
261261 texts += (item as BarcodeResultItem ).text + " \n " ;
262262 }
263- if (texts != " " ) alert (texts );
263+ if (texts !== " " ) alert (texts );
264264 if (! result .items .length ) alert (" No barcode found" );
265265 } catch (ex : any ) {
266266 if (ex .message .indexOf (" network connection error" )) {
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ function ImageCapture() {
3434 console . log ( ( item as BarcodeResultItem ) . text ) ;
3535 texts += ( item as BarcodeResultItem ) . text + "\n" ;
3636 }
37- if ( texts != "" ) alert ( texts ) ;
37+ if ( texts !== "" ) alert ( texts ) ;
3838 if ( ! result . items . length ) alert ( "No barcode found" ) ;
3939 } catch ( ex : any ) {
4040 if ( ex . message . indexOf ( "network connection error" ) ) {
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ const decodeImg = async (e: Event) => {
235235 console.log((item as BarcodeResultItem).text);
236236 texts += (item as BarcodeResultItem).text + "\n";
237237 }
238- if (texts != "") alert(texts);
238+ if (texts !== "") alert(texts);
239239 if (!result.items.length) alert("No barcode found");
240240 } catch (ex: any) {
241241 let errMsg = ex.message || ex;
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ const decodeImg = async (e: Event) => {
1818 console .log ((item as BarcodeResultItem ).text );
1919 texts += (item as BarcodeResultItem ).text + " \n " ;
2020 }
21- if (texts != " " ) alert (texts );
21+ if (texts !== " " ) alert (texts );
2222 if (! result .items .length ) alert (" No barcode found" );
2323 } catch (ex : any ) {
2424 let errMsg = ex .message || ex ;
Original file line number Diff line number Diff line change @@ -258,7 +258,7 @@ function ImageCapture() {
258258 console .log ((item as BarcodeResultItem ).text );
259259 texts += (item as BarcodeResultItem ).text + " \n " ;
260260 }
261- if (texts != " " ) alert (texts );
261+ if (texts !== " " ) alert (texts );
262262 if (! result .items .length ) alert (" No barcode found" );
263263 } catch (ex : any ) {
264264 if (ex .message .indexOf (" network connection error" )) {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function ImageCapture() {
3232 console . log ( ( item as BarcodeResultItem ) . text ) ;
3333 texts += ( item as BarcodeResultItem ) . text + "\n" ;
3434 }
35- if ( texts != "" ) alert ( texts ) ;
35+ if ( texts !== "" ) alert ( texts ) ;
3636 if ( ! result . items . length ) alert ( "No barcode found" ) ;
3737 } catch ( ex : any ) {
3838 if ( ex . message . indexOf ( "network connection error" ) ) {
Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ class ImageCapture extends React.Component {
260260 console .log ((item as BarcodeResultItem ).text );
261261 texts += (item as BarcodeResultItem ).text + " \n " ;
262262 }
263- if (texts != " " ) alert (texts );
263+ if (texts !== " " ) alert (texts );
264264 if (! result .items .length ) alert (" No barcode found" );
265265 } catch (ex : any ) {
266266 let errMsg;
Original file line number Diff line number Diff line change @@ -8,8 +8,8 @@ import "./HelloWorld.css";
88
99class HelloWorld extends React . Component {
1010 state = {
11- bShowVideoCapture : true ,
12- bShowImageCapture : false ,
11+ bShowVideoCapture : false ,
12+ bShowImageCapture : true ,
1313 } ;
1414
1515 showVideoCapture = ( ) => {
You can’t perform that action at this time.
0 commit comments