Browse Source

Merge remote-tracking branch 'origin/gh-pages' into gh-pages

gh-pages
AlexDM0 9 years ago
parent
commit
fefec38d1d
10 changed files with 10962 additions and 11278 deletions
  1. +10735
    -11221
      dist/vis.js
  2. +1
    -1
      dist/vis.map
  3. +16
    -16
      dist/vis.min.js
  4. +10
    -9
      docs/network.html
  5. BIN
      download/vis.zip
  6. +63
    -0
      examples/network/35_label_stroke.html
  7. +85
    -0
      examples/network/36_HTML_in_Nodes.html
  8. +51
    -0
      examples/network/37_label_alignment.html
  9. +1
    -1
      index.html
  10. +0
    -30
      npm-debug.log

+ 10735
- 11221
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


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


+ 10
- 9
docs/network.html View File

@ -303,7 +303,8 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>level</td> <td>level</td>
<td>number</td> <td>number</td>
<td>no</td> <td>no</td>
<td>This level is used in the hierarchical layout. If this is not selected, the level does not do anything.</td>
<td>This level is used in the hierarchical layout. If this is not selected, the level does not do anything. This must be a postive number (min value: 0).
Fractions are possible but only integers are supported.</td>
</tr> </tr>
<tr> <tr>
@ -342,7 +343,7 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>no</td> <td>no</td>
<td>Horizontal position in pixels. <td>Horizontal position in pixels.
The horizontal position of the node will be fixed unless combined with the allowedToMoveX:true option. The horizontal position of the node will be fixed unless combined with the allowedToMoveX:true option.
The vertical position y may remain undefined.</td>
The vertical position y may remain undefined. This does not work with hierarchical layout.</td>
</tr> </tr>
<tr> <tr>
<td>y</td> <td>y</td>
@ -350,7 +351,7 @@ When using a DataSet, the network is automatically updating to changes in the Da
<td>no</td> <td>no</td>
<td>Vertical position in pixels. <td>Vertical position in pixels.
The vertical position of the node will be fixed unless combined with the allowedToMoveY:true option. The vertical position of the node will be fixed unless combined with the allowedToMoveY:true option.
The horizontal position x may remain undefined.</td>
The horizontal position x may remain undefined. This does not work with hierarchical layout.</td>
</tr> </tr>
</table> </table>
@ -1000,13 +1001,13 @@ All options defined per-node override these global settings.
<td>widthMin</td> <td>widthMin</td>
<td>Number</td> <td>Number</td>
<td>16</td> <td>16</td>
<td>The minimum width for a scaled image. Only applicable to shape <code>image</code>.</td>
<td>The minimum width for a scaled image. Only applicable to shape <code>image</code>. This only does something if you supply a value.</td>
</tr> </tr>
<tr> <tr>
<td>widthMax</td> <td>widthMax</td>
<td>Number</td> <td>Number</td>
<td>64</td> <td>64</td>
<td>The maximum width for a scaled image. Only applicable to shape <code>image</code>.</td>
<td>The maximum width for a scaled image. Only applicable to shape <code>image</code>. This only does something if you supply a value.</td>
</tr> </tr>
<tr> <tr>
@ -1021,14 +1022,14 @@ All options defined per-node override these global settings.
<td>Number</td> <td>Number</td>
<td>10</td> <td>10</td>
<td>The minimum radius for a scaled node. Only applicable to shapes <code>dot</code>, <td>The minimum radius for a scaled node. Only applicable to shapes <code>dot</code>,
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>.</td>
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>. This only does something if you supply a value.</td>
</tr> </tr>
<tr> <tr>
<td>radiusMax</td> <td>radiusMax</td>
<td>Number</td> <td>Number</td>
<td>30</td> <td>30</td>
<td>The maximum radius for a scaled node. Only applicable to shapes <code>dot</code>, <td>The maximum radius for a scaled node. Only applicable to shapes <code>dot</code>,
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>.</td>
<code>star</code>, <code>triangle</code>, <code>triangleDown</code>, and <code>square</code>. This only does something if you supply a value.</td>
</tr> </tr>
</table> </table>
@ -1224,13 +1225,13 @@ var options = {
<td>widthMin</td> <td>widthMin</td>
<td>Number</td> <td>Number</td>
<td>1</td> <td>1</td>
<td>The minimum thickness of the line when using per-edge defined values.</td>
<td>The minimum thickness of the line when using per-edge defined values. This does nothing if you have not defined a value.</td>
</tr> </tr>
<tr> <tr>
<td>widthMax</td> <td>widthMax</td>
<td>Number</td> <td>Number</td>
<td>15</td> <td>15</td>
<td>The maximum thickness of the line when using per-edge defined values.</td>
<td>The maximum thickness of the line when using per-edge defined values. This does nothing if you have not defined a value.</td>
</tr> </tr>
</table> </table>

BIN
download/vis.zip View File


+ 63
- 0
examples/network/35_label_stroke.html View File

@ -0,0 +1,63 @@
<!doctype html>
<html>
<head>
<title>Network | Label stroke</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {
width: 400px;
height: 400px;
border: 1px solid lightgray;
background: #d1d1d1;
}
</style>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
// create an array with nodes
var nodes = [
{id: 1, label: 'Node 1', fontStrokeWidth : 5, fontStrokeColor: 'white'},
{id: 2, label: 'Node 2'},
{id: 3, label: 'Node 3'},
{id: 4, label: 'Node 4'},
{id: 5, label: 'Node 5'}
];
// create an array with edges
var edges = [
{from: 1, to: 2, label: 'edgeLabel', fontStrokeWidth : 2, fontStrokeColor : '#00ff00'},
{from: 1, to: 3, label: 'edgeLabel'},
{from: 2, to: 4},
{from: 2, to: 5}
];
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {
nodes : {
shape : 'dot',
fontStrokeWidth : 1,
fontStrokeColor : '#d1d1d1'
},
edges : {
fontStrokeWidth : 1,
fontStrokeColor : '#d1d1d1',
fontFill : 'none'
}
};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>

+ 85
- 0
examples/network/36_HTML_in_Nodes.html View File

@ -0,0 +1,85 @@
<!doctype html>
<html>
<head>
<title>Network | HTML in nodex</title>
<style type="text/css">
body {
font: 10pt arial;
}
#mynetwork {
width: 600px;
height: 600px;
border: 1px solid lightgray;
background-color:#eeeeee;
}
</style>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
var nodes = null;
var edges = null;
var network = null;
var DIR = 'img/refresh-cl/';
var LENGTH_MAIN = 150;
var LENGTH_SUB = 50;
var data = '<svg xmlns="http://www.w3.org/2000/svg" width="243" height="65">' +
'<rect x="0" y="0" width="100%" height="100%" fill="#7890A7" stroke-width="20" stroke="#ffffff" ></rect>' +
'<foreignObject x="15" y="10" width="100%" height="100%">' +
'<div xmlns="http://www.w3.org/1999/xhtml" style="font-size:40px">' +
'<em>I</em> like' +
'<span style="color:white; text-shadow:0 0 20px #000000;">' +
'cheese</span>' +
'</div>' +
'</foreignObject>' +
'</svg>';
var DOMURL = window.URL || window.webkitURL || window;
var img = new Image();
var svg = new Blob([data], {type: 'image/svg+xml;charset=utf-8'});
var url = DOMURL.createObjectURL(svg);
// Called when the Visualization API is loaded.
function draw() {
// Create a data table with nodes.
nodes = [];
// Create a data table with links.
edges = [];
nodes.push({id: 1, label: 'Get HTML', image: url, shape: 'image'});
nodes.push({id: 2, label: 'Using SVG', image: url, shape: 'image'});
edges.push({from: 1, to: 2, length: 300});
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {
stabilize: false,
smoothCurves:false
};
network = new vis.Network(container, data, options);
}
</script>
</head>
<body onload="draw()">
<p>
This example demonstrates showing custom HTML in Nodes, by using an SVG image.
</p>
<p style="color: red;">
WARNING: this is currently not supported by all browsers.
</p>
<div id="mynetwork"></div>
</body>
</html>

+ 51
- 0
examples/network/37_label_alignment.html View File

@ -0,0 +1,51 @@
<!doctype html>
<html>
<head>
<title>Network | Basic usage</title>
<script type="text/javascript" src="../../dist/vis.js"></script>
<link href="../../dist/vis.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#mynetwork {
width: 400px;
height: 400px;
border: 1px solid lightgray;
}
</style>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
// create an array with nodes
var nodes = [
{id: 1, label: 'Node 1'},
{id: 2, label: 'Node 2'},
{id: 3, label: 'Node 3'},
{id: 4, label: 'Node 4'},
{id: 5, label: 'Node 5'}
];
// create an array with edges
var edges = [
{from: 1, to: 2, label: '1 to 2', labelAlignment:'line-center', fontFill:'orange' },
{from: 1, to: 3, label: '1 to 3', labelAlignment:'line-above', fontFill:'green'},
{from: 2, to: 4, label: '2 to 4', fontFill:'red'},
{from: 2, to: 5, label: '2 to 5', labelAlignment:'line-below', fontFill:'#ccd' }
];
// create a network
var container = document.getElementById('mynetwork');
var data = {
nodes: nodes,
edges: edges
};
var options = {};
var network = new vis.Network(container, data, options);
</script>
</body>
</html>

+ 1
- 1
index.html View File

@ -213,7 +213,7 @@
<pre class="prettyprint">npm install vis</pre> <pre class="prettyprint">npm install vis</pre>
<h3>installing with bower</h3> <h3>installing with bower</h3>
<pre class="prettyprint">bower install vis</pre> <pre class="prettyprint">bower install vis</pre>
<a href="download/vis.zip"><h3>download zip (version <span class="version">3.9.0</span>)</h3></a>
<a href="download/vis.zip"><h3>download zip (version <span class="version">3.9.1</span>)</h3></a>
</p> </p>
</div> </div>
</div> </div>

+ 0
- 30
npm-debug.log View File

@ -1,30 +0,0 @@
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'run',
1 verbose cli 'watch-dev' ]
2 info using npm@1.4.14
3 info using node@v0.10.29
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'prewatch-dev', 'watch-dev', 'postwatch-dev' ]
6 info prewatch-dev vis@3.7.2-SNAPSHOT
7 info watch-dev vis@3.7.2-SNAPSHOT
8 verbose unsafe-perm in lifecycle true
9 info vis@3.7.2-SNAPSHOT Failed to exec watch-dev script
10 error vis@3.7.2-SNAPSHOT watch-dev: `gulp watch --bundle`
10 error Exit status 8
11 error Failed at the vis@3.7.2-SNAPSHOT watch-dev script.
11 error This is most likely a problem with the vis package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error gulp watch --bundle
11 error You can get their info via:
11 error npm owner ls vis
11 error There is likely additional logging output above.
12 error System Windows_NT 6.1.7601
13 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "watch-dev"
14 error cwd C:\Dropbox\Almende\Projects\JavaScript\vis
15 error node -v v0.10.29
16 error npm -v 1.4.14
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]

Loading…
Cancel
Save