Browse Source

bug fix, typo fix, clarified docs

css_transitions
Alex de Mulder 10 years ago
parent
commit
2cc11d4e9b
4 changed files with 20 additions and 7 deletions
  1. +3
    -3
      dist/vis.js
  2. +5
    -3
      docs/graph.html
  3. +11
    -0
      examples/graph/21_data_manipulation.html
  4. +1
    -1
      src/graph/Edge.js

+ 3
- 3
dist/vis.js View File

@ -4,8 +4,8 @@
*
* A dynamic, browser-based visualization library.
*
* @version @@version
* @date @@date
* @version 0.6.0-SNAPSHOT
* @date 2014-02-25
*
* @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -10644,7 +10644,7 @@ Edge.prototype._drawLine = function(ctx) {
ctx.lineWidth = this._getLineWidth();
var point;
if (this.from != this.to+9) {
if (this.from != this.to) {
// draw line
this._line(ctx);

+ 5
- 3
docs/graph.html View File

@ -55,7 +55,7 @@
<li><a href="#Edges_configuration">Edges</a></li>
<li><a href="#Groups_configuration">Groups</a></li>
<li><a href="#Physics">Physics</a></li>
<li><a href="#Data_manipulation">Data_manipulation</a></li>
<li><a href="#Data_manipulation">Data manipulation</a></li>
<li><a href="#Clustering">Clustering</a></li>
<li><a href="#Navigation_controls">Navigation controls</a></li>
<li><a href="#Keyboard_navigation">Keyboard navigation</a></li>
@ -298,7 +298,8 @@ var nodes = [
<td>true</td>
<td>If allowedToMove is false, then the node will not move from its supplied position.
If only an x position has been supplied, it is only fixed in the x-direction.
The same holds for y. If both x and y have been defined, the node will not move.</td>
The same holds for y. If both x and y have been defined, the node will not move.
If no x or y have been supplied, this argument will not do anything.</td>
</tr>
<tr>
<td>fontColor</td>
@ -850,7 +851,8 @@ var options = {
<td>false</td>
<td>If allowedToMove is false, then the node will not move from its supplied position.
If only an x position has been supplied, it is only fixed in the x-direction.
The same holds for y. If both x and y have been defined, the node will not move.</td>
The same holds for y. If both x and y have been defined, the node will not move.
If no x or y have been supplied, this argument will not do anything.</td>
</tr>
<tr>

+ 11
- 0
examples/graph/21_data_manipulation.html View File

@ -146,6 +146,17 @@
saveButton.onclick = saveData.bind(this,data,callback);
cancelButton.onclick = clearPopUp.bind();
div.style.display = 'block';
},
onConnect: function(data,callback) {
if (data.from == data.to) {
var r=confirm("Do you want to connect the node to itself?");
if (r==true) {
callback(data);
}
}
else {
callback(data);
}
}
};
graph = new vis.Graph(container, data, options);

+ 1
- 1
src/graph/Edge.js View File

@ -231,7 +231,7 @@ Edge.prototype._drawLine = function(ctx) {
ctx.lineWidth = this._getLineWidth();
var point;
if (this.from != this.to+9) {
if (this.from != this.to) {
// draw line
this._line(ctx);

Loading…
Cancel
Save