Updated to 0.11.0

This commit is contained in:
Christoph Oberhofer
2016-04-24 22:03:07 +02:00
parent d415ec358c
commit 32463b3e51
19 changed files with 1022 additions and 733 deletions
+1
View File
@@ -29,6 +29,7 @@ showInMenu: false
<option value="code_39">Code 39</option>
<option value="code_39_vin">Code 39 VIN</option>
<option value="ean">EAN</option>
<option value="ean_extended">EAN-extended</option>
<option value="ean_8">EAN-8</option>
<option value="upc">UPC</option>
<option value="upc_e">UPC-E</option>
+20 -4
View File
@@ -88,7 +88,20 @@ $(function() {
},
decoder: {
readers: function(value) {
return [value + "_reader"];
if (value === 'ean_extended') {
return [{
format: "ean_reader",
config: {
supplements: [
'ean_5_reader', 'ean_2_reader'
]
}
}];
}
return [{
format: value + "_reader",
config: {}
}];
}
}
},
@@ -102,13 +115,16 @@ $(function() {
},
numOfWorkers: 1,
decoder: {
readers: ["code_128_reader"]
readers: [{
format: "code_128_reader",
config: {}
}]
},
locate: true,
src: null
}
};
App.init();
Quagga.onProcessed(function(result) {
@@ -145,4 +161,4 @@ $(function() {
$node.find("h4.code").html(code);
$("#result_strip ul.thumbnails").prepend($node);
});
});
});
+919 -718
View File
File diff suppressed because one or more lines are too long
+3 -3
View File
File diff suppressed because one or more lines are too long
+1
View File
@@ -23,6 +23,7 @@ showInMenu: false
<option value="code_39">Code 39</option>
<option value="code_39_vin">Code 39 VIN</option>
<option value="ean">EAN</option>
<option value="ean_extended">EAN-extended</option>
<option value="ean_8">EAN-8</option>
<option value="upc">UPC</option>
<option value="upc_e">UPC-E</option>
+18 -2
View File
@@ -79,7 +79,20 @@ $(function() {
},
decoder: {
readers: function(value) {
return [value + "_reader"];
if (value === 'ean_extended') {
return [{
format: "ean_reader",
config: {
supplements: [
'ean_5_reader', 'ean_2_reader'
]
}
}];
}
return [{
format: value + "_reader",
config: {}
}];
}
}
},
@@ -98,7 +111,10 @@ $(function() {
},
numOfWorkers: 4,
decoder: {
readers : ["code_128_reader"]
readers : [{
format: "code_128_reader",
config: {}
}]
},
locate: true
},
+1
View File
@@ -23,6 +23,7 @@ showInMenu: false
<option value="code_128" selected="selected">Code 128</option>
<option value="code_39">Code 39</option>
<option value="ean">EAN</option>
<option value="ean_extended">EAN-extended</option>
<option value="ean_8">EAN-8</option>
<option value="upc">UPC</option>
<option value="upc_e">UPC-E</option>
+21 -5
View File
@@ -1,7 +1,7 @@
$(function() {
var App = {
init: function() {
var config = this.config[this.state.decoder.readers[0]] || this.config.default;
var config = this.config[this.state.decoder.readers[0].format] || this.config.default;
config = $.extend(true, {}, config, this.state);
Quagga.init(config, function() {
App.attachListeners();
@@ -94,7 +94,20 @@ $(function() {
inputMapper: {
decoder: {
readers: function(value) {
return [value + "_reader"];
if (value === 'ean_extended') {
return [{
format: "ean_reader",
config: {
supplements: [
'ean_5_reader', 'ean_2_reader'
]
}
}];
}
return [{
format: value + "_reader",
config: {}
}];
}
},
inputStream: {
@@ -108,11 +121,14 @@ $(function() {
src: "../test/fixtures/code_128/"
},
decoder : {
readers : ["code_128_reader"]
readers : [{
format: "code_128_reader",
config: {}
}]
}
}
};
App.init();
Quagga.onProcessed(function(result) {
@@ -149,4 +165,4 @@ $(function() {
$node.find("h4.code").html(detectedCode);
$("#result_strip ul.thumbnails").prepend($node);
});
});
});