Browse Source

added docs for null and undefined. Reduced levenshtein distance threshold from 10 to 8 in validator

flowchartTest
Alex de Mulder 9 years ago
parent
commit
0d9e6b0d4f
4 changed files with 553 additions and 547 deletions
  1. +546
    -546
      dist/vis.js
  2. +3
    -0
      docs/network/edges.html
  3. +3
    -0
      docs/network/nodes.html
  4. +1
    -1
      lib/network/modules/Validator.js

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


+ 3
- 0
docs/network/edges.html View File

@ -89,6 +89,9 @@
<p>The options for the edges have to be contained in an object titled 'edges'. All of these options can be supplied per edge as well. Obviously, 'id' should not be defined globally but per edge. Options defined
in the global edges object, are applied to all edges. If an edge has options of its own, those will be used instead of the global options.</p>
<p><b><i>When you have given an edge an option, you will override the global option for that property. If you then set that option to <code>undefined</code> or <code>null</code>,
it will revert back to the default value.</i></b>
</p>
<p>Click on the full options or shorthand options to show how these options are supposed to be used.</p>
<ul class="nav nav-tabs">
<li role="presentation" class="active" onclick="hideOptions('fullTab','fullOptions','shortTab','shortOptions');" id="hiddenTab"><a href="#">options hidden</a></li>

+ 3
- 0
docs/network/nodes.html View File

@ -80,6 +80,9 @@
<h3>Options</h3>
<p>The options for the nodes have to be contained in an object titled 'nodes'. All of these options can be supplied per node as well. Obviously, 'id' should not be defined globally but per node. Options defined
in the global nodes object, are applied to all nodes. If a node has options of its own, those will be used instead of the global options.</p>
<p><b><i>When you have given a node an option, you will override the global option for that property. If you then set that option to <code>undefined</code> or <code>null</code>,
it will revert back to the default value.</i></b>
</p>
<p>Click on the full options or shorthand options to show how these options are supposed to be used.</p>
<ul class="nav nav-tabs">
<li role="presentation" class="active" onclick="hideOptions('fullTab','fullOptions','shortTab','shortOptions');" id="hiddenTab"><a href="#">options hidden</a></li>

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

@ -161,7 +161,7 @@ class Validator {
static getSuggestion(option, options, path) {
let closestMatch = '';
let min = 1e9;
let threshold = 10;
let threshold = 8;
for (let op in options) {
let distance = Validator.levenshteinDistance(option, op);
if (min > distance && distance < threshold) {

Loading…
Cancel
Save