Improved versions of the examples-pages. Now including the possibility to switch between Code128 and EAN.

This commit is contained in:
Christoph Oberhofer
2014-11-04 21:28:14 +01:00
parent 5e4c3aeb55
commit d806d48b0f
10 changed files with 152 additions and 52 deletions
+5
View File
@@ -238,6 +238,11 @@ define(["bresenham", "image_debug", 'code_128_reader', 'ean_reader'], function(B
return result;
}
}
},
setReaders: function(readers) {
config.readers = readers;
_barcodeReaders.length = 0;
initReaders();
}
};
}
+3
View File
@@ -198,6 +198,9 @@ function(Code128Reader, EANReader, InputStream, ImageWrapper, BarcodeLocator, Ba
isInitialized : function() {
return _initialized;
},
setReaders: function(readers) {
_decoder.setReaders(readers);
},
canvas : _canvasContainer,
decodeSingle : function(config, resultCallback) {
config.inputStream = {