Browse Source

updated examples, dist, docs

gh-pages
Alex de Mulder 10 years ago
parent
commit
5ae001f5e0
18 changed files with 2228 additions and 2053 deletions
  1. +2106
    -1977
      dist/vis.js
  2. +1
    -1
      dist/vis.map
  3. +14
    -14
      dist/vis.min.js
  4. +0
    -12
      docs/graph2d.html
  5. +10
    -4
      docs/network.html
  6. +0
    -18
      docs/timeline.html
  7. +0
    -22
      examples/index.html
  8. +10
    -1
      examples/network/02_random_nodes.html
  9. +13
    -3
      examples/network/06_groups.html
  10. +8
    -0
      examples/network/15_dot_language_playground.html
  11. +9
    -0
      examples/network/18_fully_random_nodes_clustering.html
  12. +9
    -0
      examples/network/19_scale_free_graph_clustering.html
  13. +9
    -0
      examples/network/20_navigation.html
  14. +7
    -1
      examples/network/23_hierarchical_layout.html
  15. +8
    -0
      examples/network/24_hierarchical_layout_userdefined.html
  16. +8
    -0
      examples/network/31_localization.html
  17. +9
    -0
      examples/network/32_hierarchicaLayoutMethods.html
  18. +7
    -0
      examples/network/33_animation.html

+ 2106
- 1977
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


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


+ 0
- 12
docs/graph2d.html View File

@ -452,18 +452,6 @@ The options colored in green can also be used as options for the groups. All opt
<td>true</td>
<td>Toggle the drawing of the major labels on the Y axis.</td>
</tr>
<tr>
<td>dataAxis.showMajorLines</td>
<td>Boolean</td>
<td>true</td>
<td>Toggle the drawing of the major lines on the Y axis.</td>
</tr>
<tr>
<td>dataAxis.showMinorLines</td>
<td>Boolean</td>
<td>true</td>
<td>Toggle the drawing of the major lines on the Y axis.</td>
</tr>
<tr>
<td>dataAxis.icons</td>
<td>Boolean</td>

+ 10
- 4
docs/network.html View File

@ -2017,15 +2017,15 @@ To load a locale into the Timeline not supported by default, one can add a new l
locales: {
// create a new locale (text strings should be replaced with localized strings)
mylocale: {
add: 'Add Node',
edit: 'Edit',
link: 'Add Link',
del: 'Delete selected',
back: 'Back',
addNode: 'Add Node',
addEdge: 'Add Edge',
editNode: 'Edit Node',
editEdge: 'Edit Edge',
back: 'Back',
addDescription: 'Click in an empty space to place a new node.',
linkDescription: 'Click on a node and drag the edge to another node to connect them.',
edgeDescription: 'Click on a node and drag the edge to another node to connect them.',
editEdgeDescription: 'Click on the control points and drag them to a node to connect to it.',
createEdgeError: 'Cannot link edges to a cluster.',
deleteClusterError: 'Clusters cannot be deleted.'
@ -2155,6 +2155,12 @@ var options = {
<td>Returns the x and y coodinates of the center of the screen (in canvas space).
</td>
</tr>
<tr>
<td>getBoundingBox()</td>
<td>Object</td>
<td>Returns a bounding box for the node including label in the format: {top:Number,left:Number,right:Number,bottom:Number}. These values are in canvas space.
</td>
</tr>
<tr>
<td>getSelection()</td>
<td>Array of ids</td>

+ 0
- 18
docs/timeline.html View File

@ -742,24 +742,6 @@ var options = {
<code>showMinorLabels</code> are false, no horizontal axis will be
visible.</td>
</tr>
<tr>
<td>showMajorLines</td>
<td>boolean</td>
<td>true</td>
<td>By default, the timeline shows both minor and major date lines on the
time axis. You can use this option to hide the lines from the major dates.
</tr>
<tr>
<td>showMinorLines</td>
<td>boolean</td>
<td>true</td>
<td>By default, the timeline shows both minor and major date lines on the
time axis. You can use this option to hide the lines from the minor dates.
</tr>
<tr>
<td>stack</td>
<td>Boolean</td>

+ 0
- 22
examples/index.html View File

@ -1,22 +0,0 @@
<!doctype html>
<html>
<head>
<title>vis.js | examples</title>
<link href='../docs/css/style.css' type='text/css' rel='stylesheet'>
</head>
<body>
<div id="container">
<h1>vis.js examples</h1>
<p><a href="network">network</a></p>
<p><a href="graph2d">graph2d</a></p>
<p><a href="graph3d">graph3d</a></p>
<p><a href="timeline">timeline</a></p>
</div>
</body>
</html>

+ 10
- 1
examples/network/02_random_nodes.html View File

@ -22,7 +22,16 @@
var edges = null;
var network = null;
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
nodes = [];
edges = [];
var connectionCount = [];
@ -75,7 +84,7 @@
nodes: nodes,
edges: edges
};
var options = {stabilization:false};
var options = {stabilize:false};
network = new vis.Network(container, data, options);
// add event listeners

+ 13
- 3
examples/network/06_groups.html View File

@ -22,14 +22,24 @@
var nodes = null;
var edges = null;
var network = null;
var nodesData = null;
google.load('visualization', '1');
// Set callback to run when API is loaded
google.setOnLoadCallback(draw);
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
// Called when the Visualization API is loaded.
function draw() {
destroy();
var from, to;
nodes = [];
@ -121,11 +131,11 @@
nodeOffset += nodeCount;
group++;
}
nodesData = new vis.DataSet(nodes);
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
nodes: nodesData,
edges: edges
};
var options = {
@ -137,6 +147,7 @@
};
network = new vis.Network(container, data, options);
}
</script>
</head>
@ -149,7 +160,6 @@
<input type="submit" value="Go">
</form>
<br>
<div id="mynetwork"></div>
</body>

+ 8
- 0
examples/network/15_dot_language_playground.html View File

@ -92,8 +92,16 @@
network.redraw()
};
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
// parse and draw the data
function draw () {
destroy();
try {
txtError.innerHTML = '';

+ 9
- 0
examples/network/18_fully_random_nodes_clustering.html View File

@ -22,7 +22,16 @@
var edges = null;
var network = null;
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
nodes = [];
edges = [];
// randomly create some nodes and edges

+ 9
- 0
examples/network/19_scale_free_graph_clustering.html View File

@ -22,7 +22,16 @@
var edges = null;
var network = null;
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
nodes = [];
edges = [];
var connectionCount = [];

+ 9
- 0
examples/network/20_navigation.html View File

@ -41,7 +41,16 @@
var edges = null;
var network = null;
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
nodes = [];
edges = [];
var connectionCount = [];

+ 7
- 1
examples/network/23_hierarchical_layout.html View File

@ -22,9 +22,15 @@
var edges = null;
var network = null;
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
nodes = [];
edges = [];
var connectionCount = [];

+ 8
- 0
examples/network/24_hierarchical_layout_userdefined.html View File

@ -23,7 +23,15 @@
var network = null;
var directionInput = document.getElementById("direction");
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
nodes = [];
edges = [];
var connectionCount = [];

+ 8
- 0
examples/network/31_localization.html View File

@ -60,7 +60,15 @@
var edges = null;
var network = null;
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
nodes = [];
edges = [];
var connectionCount = [];

+ 9
- 0
examples/network/32_hierarchicaLayoutMethods.html View File

@ -21,7 +21,16 @@
var network = null;
var layoutMethod = "hubsize";
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
var nodes = [];
var edges = [];
// randomly create some nodes and edges

+ 7
- 0
examples/network/33_animation.html View File

@ -46,8 +46,15 @@
var statusUpdateSpan;
var finishMessage = "";
function destroy() {
if (network !== null) {
network.destroy();
network = null;
}
}
function draw() {
destroy();
statusUpdateSpan = document.getElementById("statusUpdate");
doButton = document.getElementById("btnDo");
focusButton = document.getElementById("btnFocus");

Loading…
Cancel
Save