Browse Source

- Fixed #974 connecting static smooth and straight edges. also bug introduced in the layout

flowchartTest
Alex de Mulder 9 years ago
parent
commit
f699061e29
6 changed files with 28470 additions and 28641 deletions
  1. +2
    -0
      HISTORY.md
  2. +28398
    -28395
      dist/vis.js
  3. +2
    -2
      lib/network/modules/LayoutEngine.js
  4. +1
    -1
      lib/network/modules/components/edges/BezierEdgeDynamic.js
  5. +4
    -1
      lib/network/modules/components/edges/util/EdgeBase.js
  6. +63
    -242
      test/networkTest.html

+ 2
- 0
HISTORY.md View File

@ -17,6 +17,8 @@ http://visjs.org
- Fixed delete callbacks with null argument not showing toolbar afterwards.
- Added zoom events from keyboard and navigation buttons.
- No longer start stabilization with an empty node set.
- Fixed #974 connecting static smooth and straight edges.
## 2015-06-16, version 4.3.0

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


+ 2
- 2
lib/network/modules/LayoutEngine.js View File

@ -149,10 +149,10 @@ class LayoutEngine {
let node = nodesArray[i];
let radius = 10 * 0.1 * nodesArray.length + 10;
let angle = 2 * Math.PI * this.seededRandom();
if (node.options.fixed.x === false || node.x === undefined) {
if (node.x === undefined) {
node.x = radius * Math.cos(angle);
}
if (node.options.fixed.x === false || node.y === undefined) {
if (node.y === undefined) {
node.y = radius * Math.sin(angle);
}
}

+ 1
- 1
lib/network/modules/components/edges/BezierEdgeDynamic.js View File

@ -16,7 +16,7 @@ class BezierEdgeDynamic extends BezierEdgeBase {
connect() {
this.from = this.body.nodes[this.options.from];
this.to = this.body.nodes[this.options.to];
if (this.from === undefined || this.to === undefined) {
if (this.from === undefined || this.to === undefined || this.options.physics === false) {
this.via.setOptions({physics:false})
}
else {

+ 4
- 1
lib/network/modules/components/edges/util/EdgeBase.js View File

@ -11,7 +11,10 @@ class EdgeBase {
this.hoverWidth = 1.5;
}
connect() {}
connect() {
this.from = this.body.nodes[this.options.from];
this.to = this.body.nodes[this.options.to];
}
cleanup() {return false}
setOptions(options) {

+ 63
- 242
test/networkTest.html
File diff suppressed because it is too large
View File


Loading…
Cancel
Save