Browse Source

fixed validator (for real now)

flowchartTest
Alex de Mulder 9 years ago
parent
commit
5b12f55e1f
4 changed files with 5414 additions and 5419 deletions
  1. +5393
    -5393
      dist/vis.js
  2. +1
    -1
      dist/vis.map
  3. +18
    -23
      dist/vis.min.js
  4. +2
    -2
      lib/network/modules/Validator.js

+ 5393
- 5393
dist/vis.js
File diff suppressed because it is too large
View File


+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


+ 18
- 23
dist/vis.min.js
File diff suppressed because it is too large
View File


+ 2
- 2
lib/network/modules/Validator.js View File

@ -168,13 +168,13 @@ class Validator {
let globalSearch = Validator.findInOptions(option,allOptions,[],true);
let localSearchThreshold = 8;
let globalSearchThreshold = 5;
let globalSearchThreshold = 4;
if (globalSearch.distance <= globalSearchThreshold && localSearch.distance > globalSearch.distance) {
console.log('%cUnknown option detected: "' + option + '" in ' + Validator.printLocation(localSearch.path, option,'') + 'Perhaps it was misplaced? Matching option found at: ' + Validator.printLocation(globalSearch.path, globalSearch.closestMatch,''), printStyle);
}
else if (localSearch.distance <= localSearchThreshold) {
console.log('%cUnknown option detected: "' + option + '". Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, localSearch.closestMatch), printStyle);
console.log('%cUnknown option detected: "' + option + '". Did you mean "' + localSearch.closestMatch + '"?' + Validator.printLocation(localSearch.path, option), printStyle);
}
else {
console.log('%cUnknown option detected: "' + option + '". Did you mean one of these: ' + Validator.print(Object.keys(options)) + Validator.printLocation(path, option), printStyle);

Loading…
Cancel
Save