Skip to content

Commit

Permalink
V2.3.2 (#620)
Browse files Browse the repository at this point in the history
* Refactor camera component to ./src/camera

 - Refactor camera component to ./src/camera from ./src/html5-qrcode.ts

* Misc fixes (codacy)

* Codacy fixes

* (refactor) Abstract camera selection UI to a separate class

* Add support for zoom slider

And misc changes.

* misc fixes.

* Misc changes per PR comments.

* Update change log + codacy fix.

* Update html5-qrcode.min.js

* Add unit test for camera-selection-ui and camera-zoom-ui

* Refactor TorchButton and remove html5qrcode deps

To make it feasible to test the class.

* Create torch-button.test.ts

* Update torch-button.test.ts

* Make supportedScanTypes optional.
  • Loading branch information
mebjas committed Nov 22, 2022
1 parent 47ebd5a commit 9b253ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ interface Html5QrcodeScannerConfig
* - [SCAN_TYPE_FILE] - Only file based scan supported.
* - Setting wrong values or multiple values will fail.
*/
supportedScanTypes: Array<Html5QrcodeScanType> | [];
supportedScanTypes?: Array<Html5QrcodeScanType> | [];

/**
* If {@code true} the rendered UI will have button to turn flash on or off
Expand Down
2 changes: 1 addition & 1 deletion minified/html5-qrcode.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/html5-qrcode-scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ interface Html5QrcodeScannerConfig
* - [SCAN_TYPE_FILE] - Only file based scan supported.
* - Setting wrong values or multiple values will fail.
*/
supportedScanTypes: Array<Html5QrcodeScanType> | [];
supportedScanTypes?: Array<Html5QrcodeScanType> | [];

/**
* If {@code true} the rendered UI will have button to turn flash on or off
Expand Down
2 changes: 1 addition & 1 deletion src/ui/scanner/scan-type-selector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {
export class ScanTypeSelector {
private supportedScanTypes: Array<Html5QrcodeScanType>;

constructor(supportedScanTypes: Array<Html5QrcodeScanType> | []) {
constructor(supportedScanTypes?: Array<Html5QrcodeScanType> | []) {
this.supportedScanTypes = this.validateAndReturnScanTypes(
supportedScanTypes);
}
Expand Down

0 comments on commit 9b253ff

Please sign in to comment.