mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
194: Refactoring/Review
This commit is contained in:
Vendored
+2
-4
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -51,8 +51,8 @@
|
||||
<option value="upc">UPC</option>
|
||||
<option value="upc_e">UPC-E</option>
|
||||
<option value="codabar">Codabar</option>
|
||||
<option value="i2of5">ITF</option>
|
||||
<option value="2of5">2of5</option>
|
||||
<option value="i2of5">Interleaved 2 of 5</option>
|
||||
<option value="2of5">Standard 2 of 5</option>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
|
||||
+2
-4
File diff suppressed because one or more lines are too long
@@ -24,7 +24,6 @@ var N = 1,
|
||||
]},
|
||||
SINGLE_CODE_ERROR: {value: 0.78, writable: true},
|
||||
AVG_CODE_ERROR: {value: 0.30, writable: true},
|
||||
MAX_CORRECTION_FACTOR: {value: 5},
|
||||
FORMAT: {value: "2of5"}
|
||||
};
|
||||
|
||||
@@ -47,7 +46,6 @@ TwoOfFiveReader.prototype._findPattern = function(pattern, offset, isWhite, tryH
|
||||
error,
|
||||
j,
|
||||
sum,
|
||||
normalized,
|
||||
epsilon = self.AVG_CODE_ERROR;
|
||||
|
||||
isWhite = isWhite || false;
|
||||
@@ -242,8 +240,7 @@ TwoOfFiveReader.prototype._decode = function() {
|
||||
if (!code) {
|
||||
return null;
|
||||
}
|
||||
if (result.length % 2 !== 0 ||
|
||||
result.length < 6) {
|
||||
if (result.length < 5) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user