From 287cfa14466d0aa12cbbddbcaa96840dd3436b3f Mon Sep 17 00:00:00 2001 From: josdejong Date: Mon, 3 Jun 2013 16:55:31 +0200 Subject: [PATCH] Splitted Graph.js into a file for every prototype (Node, Edge, ...) --- Jakefile.js | 8 + docs/graph.html | 6 +- examples/graph/19_dot_language.html | 2 +- .../graph/20_dot_language_playground.html | 2 +- src/graph/Edge.js | 566 ++ src/graph/Graph.js | 2240 +----- src/graph/Groups.js | 79 + src/graph/Images.js | 41 + src/graph/Node.js | 609 ++ src/graph/Popup.js | 105 + src/graph/dotparser.js | 452 ++ src/graph/shapes.js | 225 + src/module/exports.js | 8 + vis.js | 6410 ++++++++--------- vis.min.js | 10 +- 15 files changed, 5256 insertions(+), 5507 deletions(-) create mode 100644 src/graph/Edge.js create mode 100644 src/graph/Groups.js create mode 100644 src/graph/Images.js create mode 100644 src/graph/Node.js create mode 100644 src/graph/Popup.js create mode 100644 src/graph/dotparser.js create mode 100644 src/graph/shapes.js diff --git a/Jakefile.js b/Jakefile.js index d56a27a8..d047a970 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -66,6 +66,14 @@ task('build', {async: true}, function () { './src/component/GroupSet.js', './src/Timeline.js', + + './src/graph/dotparser.js', + './src/graph/shapes.js', + './src/graph/Node.js', + './src/graph/Edge.js', + './src/graph/Popup.js', + './src/graph/Groups.js', + './src/graph/Images.js', './src/graph/Graph.js', './src/module/exports.js' diff --git a/docs/graph.html b/docs/graph.html index 76f43dff..5c420d6e 100644 --- a/docs/graph.html +++ b/docs/graph.html @@ -531,7 +531,7 @@ var edges= [ Description - vis.Graph.util.parseDOT(data) + vis.util.parseDOT(data) Object Parse a string containing data in DOT language into a JSON object. @@ -540,7 +540,7 @@ var edges= [ - vis.Graph.util.DOTToGraph(data) + vis.util.DOTToGraph(data) Object Convert a string containing a graph in DOT language into a map @@ -559,7 +559,7 @@ Example usage:
     // parse data in DOT-notation
     var dot = 'digraph {1 -> 1 -> 2; 2 -> 3; 2 -- 4; 2 -> 1 }';
-    var data = vis.Graph.util.DOTToGraph(dot);
+    var data = vis.util.DOTToGraph(dot);
 
     // create a graph
     var graph = new vis.Graph(container, data);
diff --git a/examples/graph/19_dot_language.html b/examples/graph/19_dot_language.html
index fb3de6c9..46f4119a 100644
--- a/examples/graph/19_dot_language.html
+++ b/examples/graph/19_dot_language.html
@@ -20,7 +20,7 @@