Browse Source

DOT parser didn't like `\r` characters

css_transitions
josdejong 11 years ago
parent
commit
d17266cead
5 changed files with 16 additions and 10 deletions
  1. +3
    -0
      examples/graph/02_random_nodes.html
  2. +8
    -5
      examples/graph/graphviz/graphviz_gallery.html
  3. +2
    -2
      src/graph/dotparser.js
  4. +2
    -2
      vis.js
  5. +1
    -1
      vis.min.js

+ 3
- 0
examples/graph/02_random_nodes.html View File

@ -75,6 +75,9 @@
edges: edges
};
var options = {
nodes: {
shape: 'circle'
},
edges: {
length: 50
},

+ 8
- 5
examples/graph/graphviz/graphviz_gallery.html View File

@ -24,11 +24,14 @@
<script>
if (location.href.substr(0, 5) == 'file:') {
document.write(
'<p style="color: red;">' +
'Error: Cannot fetch the example data because of security ' +
'restrictions in JavaScript. Run the example from a server ' +
'instead of as a local file to resolve this problem.' +
'</p>');
'<p style="color: red;">' +
'Error: Cannot fetch the example data because of security ' +
'restrictions in JavaScript. Run the example from a server ' +
'instead of as a local file to resolve this problem. ' +
'Alternatively, you can load DOT graphs in ' +
'the <a href="../20_dot_language_playground.html" ' +
'style="color:red;">playground</a>.' +
'</p>');
}
</script>

+ 2
- 2
src/graph/dotparser.js View File

@ -153,7 +153,7 @@
token = '';
// skip over whitespaces
while (c == ' ' || c == '\t' || c == '\n') { // space, tab, enter
while (c == ' ' || c == '\t' || c == '\n' || c == '\r') { // space, tab, enter
next();
}
@ -199,7 +199,7 @@
}
// skip over whitespaces
while (c == ' ' || c == '\t' || c == '\n') { // space, tab, enter
while (c == ' ' || c == '\t' || c == '\n' || c == '\r') { // space, tab, enter
next();
}
}

+ 2
- 2
vis.js View File

@ -6961,7 +6961,7 @@ Timeline.prototype.getItemRange = function getItemRange() {
token = '';
// skip over whitespaces
while (c == ' ' || c == '\t' || c == '\n') { // space, tab, enter
while (c == ' ' || c == '\t' || c == '\n' || c == '\r') { // space, tab, enter
next();
}
@ -7007,7 +7007,7 @@ Timeline.prototype.getItemRange = function getItemRange() {
}
// skip over whitespaces
while (c == ' ' || c == '\t' || c == '\n') { // space, tab, enter
while (c == ' ' || c == '\t' || c == '\n' || c == '\r') { // space, tab, enter
next();
}
}

+ 1
- 1
vis.min.js
File diff suppressed because it is too large
View File


Loading…
Cancel
Save