mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 20:36:15 +02:00
Quagga2: use zxing for DataMatrix recognition
This commit is contained in:
parent
a7c5d2931e
commit
dc5114fd2f
25793
public/components_unmanaged/quagga2-reader-datamatrix/index.js
Normal file
25793
public/components_unmanaged/quagga2-reader-datamatrix/index.js
Normal file
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,9 @@
|
||||||
Grocy.Components.BarcodeScanner = {};
|
Grocy.Components.BarcodeScanner = {};
|
||||||
|
|
||||||
|
//import Quagga2DatamatrixReader from '../../components_unmanaged/quagga2-reader-datamatrix/index.js'
|
||||||
|
|
||||||
|
Quagga.registerReader("datamatrix", Quagga2DatamatrixReader);
|
||||||
|
|
||||||
Grocy.Components.BarcodeScanner.LiveVideoSizeAdjusted = false;
|
Grocy.Components.BarcodeScanner.LiveVideoSizeAdjusted = false;
|
||||||
Grocy.Components.BarcodeScanner.CheckCapabilities = async function()
|
Grocy.Components.BarcodeScanner.CheckCapabilities = async function()
|
||||||
{
|
{
|
||||||
|
|
@ -96,7 +100,8 @@ Grocy.Components.BarcodeScanner.StartScanning = function()
|
||||||
readers: [
|
readers: [
|
||||||
"ean_reader",
|
"ean_reader",
|
||||||
"ean_8_reader",
|
"ean_8_reader",
|
||||||
"code_128_reader"
|
"code_128_reader",
|
||||||
|
"datamatrix"
|
||||||
],
|
],
|
||||||
debug: {
|
debug: {
|
||||||
showCanvas: Grocy.UserSettings.quagga2_debug,
|
showCanvas: Grocy.UserSettings.quagga2_debug,
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
@push('pageScripts')
|
@push('pageScripts')
|
||||||
<script src="{{ $U('/node_modules/@ericblade/quagga2/dist/quagga.min.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/node_modules/@ericblade/quagga2/dist/quagga.min.js?v=', true) }}{{ $version }}"></script>
|
||||||
|
<script src="{{ $U('/components_unmanaged/quagga2-reader-datamatrix/index.js', true) }}?v={{ $version }}"></script>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@push('pageStyles')
|
@push('pageStyles')
|
||||||
|
|
@ -21,8 +22,7 @@
|
||||||
.combobox-container #barcodescanner-start-button {
|
.combobox-container #barcodescanner-start-button {
|
||||||
margin-right: 36px !important;
|
margin-right: 36px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
@endpush
|
@endpush
|
||||||
|
|
||||||
@endif
|
@endif
|
||||||
Loading…
Reference in New Issue
Block a user