Browse Source

Release 4.8.2

webworkersNetwork 4.8.2
Alex de Mulder 9 years ago
parent
commit
db25fa6483
9 changed files with 2060 additions and 1986 deletions
  1. +1
    -1
      HISTORY.md
  2. +1
    -1
      bower.json
  3. +2020
    -1944
      dist/vis.js
  4. +1
    -1
      dist/vis.map
  5. +1
    -1
      dist/vis.min.css
  6. +21
    -21
      dist/vis.min.js
  7. +9
    -16
      lib/network/modules/PhysicsEngine.js
  8. +1
    -1
      package.json
  9. +5
    -0
      test/network_unittests.html

+ 1
- 1
HISTORY.md View File

@ -1,7 +1,7 @@
# vis.js history
http://visjs.org
## 2015-09-07, version 4.8.2-SNAPSHOT NOT YET RELEASED
## 2015-09-14, version 4.8.2
### Network

+ 1
- 1
bower.json View File

@ -1,6 +1,6 @@
{
"name": "vis",
"version": "4.8.2-SNAPSHOT",
"version": "4.8.2",
"main": ["dist/vis.min.js", "dist/vis.min.css"],
"description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/",

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


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


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


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


+ 9
- 16
lib/network/modules/PhysicsEngine.js View File

@ -274,9 +274,10 @@ class PhysicsEngine {
* @private
*/
_emitStabilized(amountOfIterations = this.stabilizationIterations) {
if (this.stabilizationIterations > 1) {
if (this.stabilizationIterations > 1 || this.startedStabilization === true) {
setTimeout(() => {
this.body.emitter.emit('stabilized', {iterations: amountOfIterations});
this.startedStabilization = false;
this.stabilizationIterations = 0;
}, 0);
}
@ -288,6 +289,12 @@ class PhysicsEngine {
* @private
*/
physicsTick() {
// this is here to ensure that there is no start event when the network is already stable.
if (this.startedStabilization === false) {
this.body.emitter.emit('startStabilizing');
this.startedStabilization = true;
}
if (this.stabilized === false) {
// adaptivity means the timestep adapts to the situation, only applicable for stabilization
if (this.adaptiveTimestep === true && this.adaptiveTimestepEnabled === true) {
@ -350,13 +357,6 @@ class PhysicsEngine {
if (this.stabilized === true) {
this.revert();
}
else {
// this is here to ensure that there is no start event when the network is already stable.
if (this.startedStabilization === false) {
this.body.emitter.emit('startStabilizing');
this.startedStabilization = true;
}
}
this.stabilizationIterations++;
}
@ -671,14 +671,7 @@ class PhysicsEngine {
this.body.emitter.emit('_requestRedraw');
if (this.stabilized === true) {
// I want at least one stabilized event if there is nothing to stabilize.
if (this.stabilizationIterations < 2) {
this.stabilizationIterations = 2;
this._emitStabilized(0); // the zero overrules the iterations
}
else {
this._emitStabilized();
}
this._emitStabilized();
}
else {
this.startSimulation();

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{
"name": "vis",
"version": "4.8.2-SNAPSHOT",
"version": "4.8.2",
"description": "A dynamic, browser-based visualization library.",
"homepage": "http://visjs.org/",
"license": "(Apache-2.0 OR MIT)",

+ 5
- 0
test/network_unittests.html View File

@ -188,6 +188,10 @@
var allOptions = vis.network.allOptions.allOptions;
var testOptions = {};
constructOptions(allOptions, testOptions);
if (testOptions.physics === undefined) {testOptions.physics = {};}
if (testOptions.layout === undefined) {testOptions.layout = {};}
testOptions.physics.enabled = true;
testOptions.layout.improvedLayout = false;
var failed = setTimeout(function () {
console.error("FAILED", JSON.stringify(testOptions, null, 4))
}, 500);
@ -211,6 +215,7 @@
setTimeout(checkOptions, 100);
})
console.log("now testing:",testOptions)
network.setOptions(testOptions);
}
}

Loading…
Cancel
Save