diff --git a/HISTORY.md b/HISTORY.md index b59f5723..908f8763 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -24,6 +24,8 @@ http://visjs.org - Added improvedLayout 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. +- 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 diff --git a/dist/vis.js b/dist/vis.js index 3c7e48f2..c2328643 100644 --- a/dist/vis.js +++ b/dist/vis.js @@ -5,7 +5,7 @@ * A dynamic, browser-based visualization library. * * @version 4.7.1-SNAPSHOT - * @date 2015-08-19 + * @date 2015-08-25 * * @license * Copyright (C) 2011-2014 Almende B.V, http://almende.com @@ -21567,7 +21567,7 @@ return /******/ (function(modules) { // webpackBootstrap } this._push(); - this.colorPicker.insertTo(document.body); + this.colorPicker.insertTo(this.container); } /** @@ -27930,11 +27930,9 @@ return /******/ (function(modules) { // webpackBootstrap } } } 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; @@ -42788,6 +42786,9 @@ return /******/ (function(modules) { // webpackBootstrap edge['attributes'] = gEdge.attributes; edge['label'] = gEdge.label; 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['width'] = edge['value'] !== undefined ? undefined : edgegEdge.size; if (gEdge.color && options.inheritColor === false) { diff --git a/lib/network/modules/NodesHandler.js b/lib/network/modules/NodesHandler.js index e2cd6d6c..a460479d 100644 --- a/lib/network/modules/NodesHandler.js +++ b/lib/network/modules/NodesHandler.js @@ -334,11 +334,9 @@ class NodesHandler { } } 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; diff --git a/lib/shared/Configurator.js b/lib/shared/Configurator.js index eca844c4..8a1528e6 100644 --- a/lib/shared/Configurator.js +++ b/lib/shared/Configurator.js @@ -163,7 +163,7 @@ class Configurator { } this._push(); - this.colorPicker.insertTo(document.body); + this.colorPicker.insertTo(this.container); }