Improved docs

Added docs for locate

Added docs for inputStream

Removed unused code

Added docs for decoder

Improved docs
This commit is contained in:
Christoph Oberhofer
2015-12-20 21:18:08 -05:00
parent 822a6c6774
commit 0fbedf5f61
6 changed files with 152 additions and 128 deletions
-5
View File
@@ -17,14 +17,9 @@ export default {
},
singleChannel: false // true: only the red color-channel is read
},
tracking: false,
debug: false,
controls: false,
locate: true,
numOfWorkers: 4,
visual: {
show: true
},
decoder: {
drawBoundingBox: false,
showFrequency: false,
-23
View File
@@ -39,28 +39,6 @@ function initializeData(imageWrapper) {
_decoder = BarcodeDecoder.create(_config.decoder, _inputImageWrapper);
}
function initConfig() {
if (typeof document !== "undefined") {
var vis = [{
node: document.querySelector("div[data-controls]"),
prop: _config.controls
}, {
node: _canvasContainer.dom.overlay,
prop: _config.visual.show
}];
for (var i = 0; i < vis.length; i++) {
if (vis[i].node) {
if (vis[i].prop === true) {
vis[i].node.style.display = "block";
} else {
vis[i].node.style.display = "none";
}
}
}
}
}
function initInputStream(cb) {
var video;
if (_config.inputStream.type === "VideoStream") {
@@ -97,7 +75,6 @@ function canRecord(cb) {
BarcodeLocator.checkImageConstraints(_inputStream, _config.locator);
initCanvas();
_framegrabber = FrameGrabber.create(_inputStream, _canvasContainer.dom.image);
initConfig();
if (_config.numOfWorkers > 0) {
initWorkers(function() {