Browse Source

- Fixed #866, manipulation can now be set to false without crashing.

flowchartTest
Alex de Mulder 9 years ago
parent
commit
67bda4ff16
4 changed files with 45 additions and 12 deletions
  1. +15
    -0
      HISTORY.md
  2. +18
    -6
      dist/vis.js
  3. +3
    -3
      lib/network/modules/ManipulationSystem.js
  4. +9
    -3
      lib/util.js

+ 15
- 0
HISTORY.md View File

@ -1,6 +1,21 @@
# vis.js history
http://visjs.org
## UNRELEASED, version 4.0.1
### Network
- Fixed #866, manipulation can now be set to false without crashing.
- Fixed #860, edit node mode now works as it should.
- Fixed #859, images now resize again when they are loaded.
- Fixed dynamic edges not correctly handling non-existent nodes.
- Accepted pull from @killerDJO for fixing selected and hover colors for edges.
- Fixed bug with rightmouse button, scroll center and popup positions using the wrong coordinates.
### Graph2d & Timeline
- Fixed #858, removed usage of deprictated unsubscribe from dataset.
## 2015-05-22, version 4.0.0

+ 18
- 6
dist/vis.js View File

@ -806,10 +806,16 @@ return /******/ (function(modules) { // webpackBootstrap
return object instanceof Number || typeof object == 'number';
};
/**
* Remove everything in the DOM object
* @param DOMobject
*/
exports.recursiveDOMDelete = function (DOMobject) {
while (DOMobject.hasChildNodes() == true) {
exports.recursiveDOMDelete(DOMobject.firstChild);
DOMobject.removeChild(DOMobject.firstChild);
if (DOMobject) {
while (DOMobject.hasChildNodes() === true) {
exports.recursiveDOMDelete(DOMobject.firstChild);
DOMobject.removeChild(DOMobject.firstChild);
}
}
};
@ -26964,9 +26970,15 @@ return /******/ (function(modules) { // webpackBootstrap
util.recursiveDOMDelete(this.closeDiv);
// remove the manipulation divs
this.canvas.frame.removeChild(this.manipulationDiv);
this.canvas.frame.removeChild(this.editModeDiv);
this.canvas.frame.removeChild(this.closeDiv);
if (this.manipulationDiv) {
this.canvas.frame.removeChild(this.manipulationDiv);
}
if (this.editModeDiv) {
this.canvas.frame.removeChild(this.editModeDiv);
}
if (this.closeDiv) {
this.canvas.frame.removeChild(this.manipulationDiv);
}
// set the references to undefined
this.manipulationDiv = undefined;

+ 3
- 3
lib/network/modules/ManipulationSystem.js View File

@ -632,9 +632,9 @@ class ManipulationSystem {
util.recursiveDOMDelete(this.closeDiv);
// remove the manipulation divs
this.canvas.frame.removeChild(this.manipulationDiv);
this.canvas.frame.removeChild(this.editModeDiv);
this.canvas.frame.removeChild(this.closeDiv);
if (this.manipulationDiv) {this.canvas.frame.removeChild(this.manipulationDiv);}
if (this.editModeDiv) {this.canvas.frame.removeChild(this.editModeDiv);}
if (this.closeDiv) {this.canvas.frame.removeChild(this.manipulationDiv);}
// set the references to undefined
this.manipulationDiv = undefined;

+ 9
- 3
lib/util.js View File

@ -17,10 +17,16 @@ exports.isNumber = function(object) {
};
/**
* Remove everything in the DOM object
* @param DOMobject
*/
exports.recursiveDOMDelete = function(DOMobject) {
while (DOMobject.hasChildNodes() == true) {
exports.recursiveDOMDelete(DOMobject.firstChild);
DOMobject.removeChild(DOMobject.firstChild);
if (DOMobject) {
while (DOMobject.hasChildNodes() === true) {
exports.recursiveDOMDelete(DOMobject.firstChild);
DOMobject.removeChild(DOMobject.firstChild);
}
}
};

Loading…
Cancel
Save