Browse Source

appended history, fixed getPositions, moved color backer back to container from document root

webworkersNetwork
Alex de Mulder 9 years ago
parent
commit
cd842475e0
4 changed files with 14 additions and 13 deletions
  1. +2
    -0
      HISTORY.md
  2. +8
    -7
      dist/vis.js
  3. +3
    -5
      lib/network/modules/NodesHandler.js
  4. +1
    -1
      lib/shared/Configurator.js

+ 2
- 0
HISTORY.md View File

@ -24,6 +24,8 @@ http://visjs.org
- Added improvedLayout as experimental option for greatly improved stabilization times. - Added improvedLayout as experimental option for greatly improved stabilization times.
- Added adaptiveTimestep as experimental option for greatly improved stabilization times. - Added adaptiveTimestep as experimental option for greatly improved stabilization times.
- Added support for Gephi directed edges, edge labels and titles. - Added support for Gephi directed edges, edge labels and titles.
- Fixed bug where stabilization iterations were counted double. If it looks like the stabilization is slower, its because it is doing twice the amount of steps it did before.
- Fixed getPositions return values.
## 2015-07-27, version 4.7.0 ## 2015-07-27, version 4.7.0

+ 8
- 7
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 4.7.1-SNAPSHOT * @version 4.7.1-SNAPSHOT
* @date 2015-08-19
* @date 2015-08-25
* *
* @license * @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com * Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -21567,7 +21567,7 @@ return /******/ (function(modules) { // webpackBootstrap
} }
this._push(); this._push();
this.colorPicker.insertTo(document.body);
this.colorPicker.insertTo(this.container);
} }
/** /**
@ -27930,11 +27930,9 @@ return /******/ (function(modules) { // webpackBootstrap
} }
} }
} else { } else {
for (var nodeId in this.body.nodes) {
if (this.body.nodes.hasOwnProperty(nodeId)) {
var node = this.body.nodes[nodeId];
dataArray[nodeId] = { x: Math.round(node.x), y: Math.round(node.y) };
}
for (var i = 0; i < this.body.nodeIndices.length; i++) {
var node = this.body.nodes[this.body.nodeIndices[i]];
dataArray[this.body.nodeIndices[i]] = { x: Math.round(node.x), y: Math.round(node.y) };
} }
} }
return dataArray; return dataArray;
@ -42788,6 +42786,9 @@ return /******/ (function(modules) { // webpackBootstrap
edge['attributes'] = gEdge.attributes; edge['attributes'] = gEdge.attributes;
edge['label'] = gEdge.label; edge['label'] = gEdge.label;
edge['title'] = gEdge.attributes !== undefined ? gEdge.attributes.title : undefined; edge['title'] = gEdge.attributes !== undefined ? gEdge.attributes.title : undefined;
if (gEdge['type'] === 'Directed') {
edge['arrows'] = 'to';
}
// edge['value'] = gEdge.attributes !== undefined ? gEdge.attributes.Weight : undefined; // edge['value'] = gEdge.attributes !== undefined ? gEdge.attributes.Weight : undefined;
// edge['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size; // edge['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size;
if (gEdge.color && options.inheritColor === false) { if (gEdge.color && options.inheritColor === false) {

+ 3
- 5
lib/network/modules/NodesHandler.js View File

@ -334,11 +334,9 @@ class NodesHandler {
} }
} }
else { else {
for (let nodeId in this.body.nodes) {
if (this.body.nodes.hasOwnProperty(nodeId)) {
let node = this.body.nodes[nodeId];
dataArray[nodeId] = { x: Math.round(node.x), y: Math.round(node.y) };
}
for (let i = 0; i < this.body.nodeIndices.length; i++) {
let node = this.body.nodes[this.body.nodeIndices[i]];
dataArray[this.body.nodeIndices[i]] = { x: Math.round(node.x), y: Math.round(node.y) };
} }
} }
return dataArray; return dataArray;

+ 1
- 1
lib/shared/Configurator.js View File

@ -163,7 +163,7 @@ class Configurator {
} }
this._push(); this._push();
this.colorPicker.insertTo(document.body);
this.colorPicker.insertTo(this.container);
} }

Loading…
Cancel
Save