Browse Source

- Fixed #1416: Fixed error in improvedLayout.

fixDataView
Alex de Mulder 9 years ago
parent
commit
349017cf85
5 changed files with 2582 additions and 1638 deletions
  1. +2
    -0
      HISTORY.md
  2. +3
    -3
      dist/vis.js
  3. +0
    -2
      lib/network/modules/components/Node.js
  4. +2
    -1
      lib/network/modules/components/algorithms/FloydWarshall.js
  5. +2575
    -1632
      test/networkTest.html

+ 2
- 0
HISTORY.md View File

@ -20,6 +20,8 @@ http://visjs.org
- Fixed #1414: Fixed color references for nodes and edges.
- Fixed #1408: Unclustering without release function respects fixed positions now.
- Fixed #1358: Fixed example for clustering on zoom.
- Fixed #1416: Fixed error in improvedLayout.
### Timeline

+ 3
- 3
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library.
*
* @version 4.9.1-SNAPSHOT
* @date 2015-11-16
* @date 2015-11-20
*
* @license
* Copyright (C) 2011-2015 Almende B.V, http://almende.com
@ -41954,8 +41954,8 @@ return /******/ (function(modules) { // webpackBootstrap
// put the weights for the edges in. This assumes unidirectionality.
for (var i = 0; i < edgesArray.length; i++) {
var edge = edges[edgesArray[i]];
if (edge.connected === true) {
// edge has to be connected if it counts to the distances.
// edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix
if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {
D_matrix[edge.fromId][edge.toId] = 1;
D_matrix[edge.toId][edge.fromId] = 1;
}

+ 0
- 2
lib/network/modules/components/Node.js View File

@ -126,7 +126,6 @@ class Node {
if (options.size !== undefined) {this.baseSize = options.size;}
if (options.value !== undefined) {options.value = parseFloat(options.value);}
// copy group options
if (typeof options.group === 'number' || (typeof options.group === 'string' && options.group != '')) {
var groupObj = this.grouplist.get(options.group);
@ -151,7 +150,6 @@ class Node {
this.updateLabelModule();
this.updateShape(currentShape);
if (options.hidden !== undefined || options.physics !== undefined) {
return true;
}

+ 2
- 1
lib/network/modules/components/algorithms/FloydWarshall.js View File

@ -23,7 +23,8 @@ class FloydWarshall {
// put the weights for the edges in. This assumes unidirectionality.
for (let i = 0; i < edgesArray.length; i++) {
let edge = edges[edgesArray[i]];
if (edge.connected === true) { // edge has to be connected if it counts to the distances.
// edge has to be connected if it counts to the distances. If it is connected to inner clusters it will crash so we also check if it is in the D_matrix
if (edge.connected === true && D_matrix[edge.fromId] !== undefined && D_matrix[edge.toId] !== undefined) {
D_matrix[edge.fromId][edge.toId] = 1;
D_matrix[edge.toId][edge.fromId] = 1;
}

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


Loading…
Cancel
Save