Browse Source

Implemented support for id:port in DOT parser

css_transitions
josdejong 11 years ago
parent
commit
37ea6eaa9e
3 changed files with 9 additions and 9 deletions
  1. +3
    -3
      src/graph/dotparser.js
  2. +4
    -4
      vis.js
  3. +2
    -2
      vis.min.js

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

@ -76,7 +76,7 @@
* @param {String} c * @param {String} c
* @return {Boolean} isAlphaNumeric * @return {Boolean} isAlphaNumeric
*/ */
var regexAlphaNumeric = /[a-zA-Z_0-9.#]/;
var regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;
function isAlphaNumeric(c) { function isAlphaNumeric(c) {
return regexAlphaNumeric.test(c); return regexAlphaNumeric.test(c);
} }
@ -298,7 +298,7 @@
} }
// check for an identifier (number or string) // check for an identifier (number or string)
// TODO: more precise parsing of numbers/strings
// TODO: more precise parsing of numbers/strings (and the port separator ':')
if (isAlphaNumeric(c) || c == '-') { if (isAlphaNumeric(c) || c == '-') {
token += c; token += c;
next(); next();
@ -456,7 +456,7 @@
} }
graph.attr[id] = token; graph.attr[id] = token;
getToken(); getToken();
// TODO: implement comma separated list with "ID=ID"
// TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] "
} }
else { else {
parseNodeStatement(graph, id); parseNodeStatement(graph, id);

+ 4
- 4
vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 0.1.0-SNAPSHOT * @version 0.1.0-SNAPSHOT
* @date 2013-06-10
* @date 2013-06-11
* *
* @license * @license
* Copyright (C) 2011-2013 Almende B.V, http://almende.com * Copyright (C) 2011-2013 Almende B.V, http://almende.com
@ -6884,7 +6884,7 @@ Timeline.prototype.getItemRange = function getItemRange() {
* @param {String} c * @param {String} c
* @return {Boolean} isAlphaNumeric * @return {Boolean} isAlphaNumeric
*/ */
var regexAlphaNumeric = /[a-zA-Z_0-9.#]/;
var regexAlphaNumeric = /[a-zA-Z_0-9.:#]/;
function isAlphaNumeric(c) { function isAlphaNumeric(c) {
return regexAlphaNumeric.test(c); return regexAlphaNumeric.test(c);
} }
@ -7106,7 +7106,7 @@ Timeline.prototype.getItemRange = function getItemRange() {
} }
// check for an identifier (number or string) // check for an identifier (number or string)
// TODO: more precise parsing of numbers/strings
// TODO: more precise parsing of numbers/strings (and the port separator ':')
if (isAlphaNumeric(c) || c == '-') { if (isAlphaNumeric(c) || c == '-') {
token += c; token += c;
next(); next();
@ -7264,7 +7264,7 @@ Timeline.prototype.getItemRange = function getItemRange() {
} }
graph.attr[id] = token; graph.attr[id] = token;
getToken(); getToken();
// TODO: implement comma separated list with "ID=ID"
// TODO: implement comma separated list with "a_list: ID=ID [','] [a_list] "
} }
else { else {
parseNodeStatement(graph, id); parseNodeStatement(graph, id);

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


Loading…
Cancel
Save