Browse Source

added update hierarchical layout to update nodes event per #101

css_transitions
Alex de Mulder 10 years ago
parent
commit
a7ca47527a
2 changed files with 12 additions and 11 deletions
  1. +7
    -7
      dist/vis.js
  2. +5
    -4
      src/graph/Graph.js

+ 7
- 7
dist/vis.js View File

@ -4,8 +4,8 @@
* *
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version @@version
* @date @@date
* @version 0.7.4-SNAPSHOT
* @date 2014-04-23
* *
* @license * @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com * Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -16776,7 +16776,6 @@ Graph.prototype._create = function () {
this.frame.className = 'graph-frame'; this.frame.className = 'graph-frame';
this.frame.style.position = 'relative'; this.frame.style.position = 'relative';
this.frame.style.overflow = 'hidden'; this.frame.style.overflow = 'hidden';
this.frame.style.zIndex = "1";
// create the graph canvas (HTML canvas element) // create the graph canvas (HTML canvas element)
this.frame.canvas = document.createElement( 'canvas' ); this.frame.canvas = document.createElement( 'canvas' );
@ -17399,12 +17398,13 @@ Graph.prototype._updateNodes = function(ids) {
// create node // create node
node = new Node(properties, this.images, this.groups, this.constants); node = new Node(properties, this.images, this.groups, this.constants);
nodes[id] = node; nodes[id] = node;
if (!node.isFixed()) {
this.moving = true;
}
} }
} }
this.moving = true;
if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) {
this._resetLevels();
this._setupHierarchicalLayout();
}
this._updateNodeIndexList(); this._updateNodeIndexList();
this._reconnectEdges(); this._reconnectEdges();
this._updateValueRange(nodes); this._updateValueRange(nodes);

+ 5
- 4
src/graph/Graph.js View File

@ -1359,12 +1359,13 @@ Graph.prototype._updateNodes = function(ids) {
// create node // create node
node = new Node(properties, this.images, this.groups, this.constants); node = new Node(properties, this.images, this.groups, this.constants);
nodes[id] = node; nodes[id] = node;
if (!node.isFixed()) {
this.moving = true;
}
} }
} }
this.moving = true;
if (this.constants.hierarchicalLayout.enabled == true && this.initializing == false) {
this._resetLevels();
this._setupHierarchicalLayout();
}
this._updateNodeIndexList(); this._updateNodeIndexList();
this._reconnectEdges(); this._reconnectEdges();
this._updateValueRange(nodes); this._updateValueRange(nodes);

Loading…
Cancel
Save