Browse Source

- found source of dynamicEdges problem and fixed

v3_develop
Alex de Mulder 10 years ago
parent
commit
e561505bb0
2 changed files with 9 additions and 2 deletions
  1. +6
    -2
      dist/vis.js
  2. +3
    -0
      lib/network/Node.js

+ 6
- 2
dist/vis.js View File

@ -11492,8 +11492,8 @@ return /******/ (function(modules) { // webpackBootstrap
*/ */
function Range(body, options) { function Range(body, options) {
var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0); var now = moment().hours(0).minutes(0).seconds(0).milliseconds(0);
this.start = now.clone().add('days', -3).valueOf(); // Number
this.end = now.clone().add('days', 4).valueOf(); // Number
this.start = now.clone().add(-3, 'days').valueOf(); // Number
this.end = now.clone().add(4, 'days').valueOf(); // Number
this.body = body; this.body = body;
@ -22543,6 +22543,7 @@ return /******/ (function(modules) { // webpackBootstrap
for (id in nodes) { for (id in nodes) {
if (nodes.hasOwnProperty(id)) { if (nodes.hasOwnProperty(id)) {
nodes[id].edges = []; nodes[id].edges = [];
nodes[id].dynamicEdges = [];
} }
} }
@ -24579,6 +24580,9 @@ return /******/ (function(modules) { // webpackBootstrap
var index = this.edges.indexOf(edge); var index = this.edges.indexOf(edge);
if (index != -1) { if (index != -1) {
this.edges.splice(index, 1); this.edges.splice(index, 1);
}
index = this.dynamicEdges.indexOf(edge);
if (index != -1) {
this.dynamicEdges.splice(index, 1); this.dynamicEdges.splice(index, 1);
} }
this.dynamicEdgesLength = this.dynamicEdges.length; this.dynamicEdgesLength = this.dynamicEdges.length;

+ 3
- 0
lib/network/Node.js View File

@ -120,6 +120,9 @@ Node.prototype.detachEdge = function(edge) {
var index = this.edges.indexOf(edge); var index = this.edges.indexOf(edge);
if (index != -1) { if (index != -1) {
this.edges.splice(index, 1); this.edges.splice(index, 1);
}
index = this.dynamicEdges.indexOf(edge);
if (index != -1) {
this.dynamicEdges.splice(index, 1); this.dynamicEdges.splice(index, 1);
} }
this.dynamicEdgesLength = this.dynamicEdges.length; this.dynamicEdgesLength = this.dynamicEdges.length;

Loading…
Cancel
Save