Comparing version 0.6.10 to 0.6.11
{ | ||
"name": "quagga", | ||
"version": "0.6.10", | ||
"version": "0.6.11", | ||
"description": "An advanced barcode-scanner written in JavaScript", | ||
@@ -5,0 +5,0 @@ "main": "dist/quagga.js", |
@@ -137,9 +137,6 @@ /* jshint undef: true, unused: true, browser:true, devel: true */ | ||
extendLine(ext); | ||
while (ext > 1 && !inputImageWrapper.inImageWithBorder(line[0], 0) || !inputImageWrapper.inImageWithBorder(line[1], 0)) { | ||
ext -= Math.floor(ext/2); | ||
while (ext > 1 && (!inputImageWrapper.inImageWithBorder(line[0], 0) || !inputImageWrapper.inImageWithBorder(line[1], 0))) { | ||
ext -= Math.ceil(ext/2); | ||
extendLine(-ext); | ||
} | ||
if (ext <= 1) { | ||
return null; | ||
} | ||
return line; | ||
@@ -146,0 +143,0 @@ } |
@@ -114,5 +114,3 @@ /* jshint undef: true, unused: true, browser:true, devel: true, evil: true */ | ||
function canRecord(cb) { | ||
if (_config.locate) { | ||
BarcodeLocator.checkImageConstraints(_inputStream, _config.locator); | ||
} | ||
BarcodeLocator.checkImageConstraints(_inputStream, _config.locator); | ||
initCanvas(); | ||
@@ -184,6 +182,6 @@ _framegrabber = FrameGrabber.create(_inputStream, _canvasContainer.dom.image); | ||
_boxSize = [ | ||
vec2.create([20, _inputImageWrapper.size.y / 2 - 100]), | ||
vec2.create([20, _inputImageWrapper.size.y / 2 + 100]), | ||
vec2.create([_inputImageWrapper.size.x - 20, _inputImageWrapper.size.y / 2 + 100]), | ||
vec2.create([_inputImageWrapper.size.x - 20, _inputImageWrapper.size.y / 2 - 100]) | ||
vec2.create([0, 0]), | ||
vec2.create([0, _inputImageWrapper.size.y]), | ||
vec2.create([_inputImageWrapper.size.x, _inputImageWrapper.size.y]), | ||
vec2.create([_inputImageWrapper.size.x, 0]) | ||
]; | ||
@@ -197,3 +195,7 @@ BarcodeLocator.init(_inputImageWrapper, _config.locator); | ||
} else { | ||
return [_boxSize]; | ||
return [[ | ||
vec2.create(_boxSize[0]), | ||
vec2.create(_boxSize[1]), | ||
vec2.create(_boxSize[2]), | ||
vec2.create(_boxSize[3])]]; | ||
} | ||
@@ -200,0 +202,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1941288
43754