Browse Source

Fixed flipping of hierachical network on update when using RL and DU.

v3_develop
AlexDM0 9 years ago
parent
commit
aee4d5848a
5 changed files with 9 additions and 8 deletions
  1. +1
    -0
      HISTORY.md
  2. +3
    -3
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +3
    -3
      dist/vis.min.js
  5. +1
    -1
      lib/network/mixins/HierarchicalLayoutMixin.js

+ 1
- 0
HISTORY.md View File

@ -108,6 +108,7 @@ http://visjs.org
### Network ### Network
- Fixed dashed and arrow lines not using inheritColor. - Fixed dashed and arrow lines not using inheritColor.
- Fixed flipping of hierachical network on update when using RL and DU.
### DataSet ### DataSet

+ 3
- 3
dist/vis.js View File

@ -5,7 +5,7 @@
* A dynamic, browser-based visualization library. * A dynamic, browser-based visualization library.
* *
* @version 3.7.2-SNAPSHOT * @version 3.7.2-SNAPSHOT
* @date 2014-12-09
* @date 2014-12-16
* *
* @license * @license
* Copyright (C) 2011-2014 Almende B.V, http://almende.com * Copyright (C) 2011-2014 Almende B.V, http://almende.com
@ -31981,7 +31981,7 @@ return /******/ (function(modules) { // webpackBootstrap
if (this.triggerFunctions.del) { if (this.triggerFunctions.del) {
var me = this; var me = this;
var data = {nodes: selectedNodes, edges: selectedEdges}; var data = {nodes: selectedNodes, edges: selectedEdges};
if (this.triggerFunctions.del.length = 2) {
if (this.triggerFunctions.del.length == 2) {
this.triggerFunctions.del(data, function (finalizedData) { this.triggerFunctions.del(data, function (finalizedData) {
me.edgesData.remove(finalizedData.edges); me.edgesData.remove(finalizedData.edges);
me.nodesData.remove(finalizedData.nodes); me.nodesData.remove(finalizedData.nodes);
@ -32214,7 +32214,7 @@ return /******/ (function(modules) { // webpackBootstrap
exports._setupHierarchicalLayout = function() { exports._setupHierarchicalLayout = function() {
if (this.constants.hierarchicalLayout.enabled == true && this.nodeIndices.length > 0) { if (this.constants.hierarchicalLayout.enabled == true && this.nodeIndices.length > 0) {
if (this.constants.hierarchicalLayout.direction == "RL" || this.constants.hierarchicalLayout.direction == "DU") { if (this.constants.hierarchicalLayout.direction == "RL" || this.constants.hierarchicalLayout.direction == "DU") {
this.constants.hierarchicalLayout.levelSeparation *= -1;
this.constants.hierarchicalLayout.levelSeparation = this.constants.hierarchicalLayout.levelSeparation < 0 ? this.constants.hierarchicalLayout.levelSeparation : this.constants.hierarchicalLayout.levelSeparation * -1;
} }
else { else {
this.constants.hierarchicalLayout.levelSeparation = Math.abs(this.constants.hierarchicalLayout.levelSeparation); this.constants.hierarchicalLayout.levelSeparation = Math.abs(this.constants.hierarchicalLayout.levelSeparation);

+ 1
- 1
dist/vis.map
File diff suppressed because it is too large
View File


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


+ 1
- 1
lib/network/mixins/HierarchicalLayoutMixin.js View File

@ -19,7 +19,7 @@ exports._resetLevels = function() {
exports._setupHierarchicalLayout = function() { exports._setupHierarchicalLayout = function() {
if (this.constants.hierarchicalLayout.enabled == true && this.nodeIndices.length > 0) { if (this.constants.hierarchicalLayout.enabled == true && this.nodeIndices.length > 0) {
if (this.constants.hierarchicalLayout.direction == "RL" || this.constants.hierarchicalLayout.direction == "DU") { if (this.constants.hierarchicalLayout.direction == "RL" || this.constants.hierarchicalLayout.direction == "DU") {
this.constants.hierarchicalLayout.levelSeparation *= -1;
this.constants.hierarchicalLayout.levelSeparation = this.constants.hierarchicalLayout.levelSeparation < 0 ? this.constants.hierarchicalLayout.levelSeparation : this.constants.hierarchicalLayout.levelSeparation * -1;
} }
else { else {
this.constants.hierarchicalLayout.levelSeparation = Math.abs(this.constants.hierarchicalLayout.levelSeparation); this.constants.hierarchicalLayout.levelSeparation = Math.abs(this.constants.hierarchicalLayout.levelSeparation);

Loading…
Cancel
Save