Browse Source

- fixed possible cause for freezing graph when animating

v3_develop
Alex de Mulder 9 years ago
parent
commit
1c1250ff74
8 changed files with 524 additions and 756 deletions
  1. +5
    -0
      HISTORY.md
  2. +499
    -738
      dist/vis.js
  3. +1
    -1
      dist/vis.map
  4. +1
    -1
      dist/vis.min.css
  5. +14
    -14
      dist/vis.min.js
  6. +2
    -1
      examples/network/02_random_nodes.html
  7. +1
    -0
      lib/network/Network.js
  8. +1
    -1
      lib/network/mixins/NavigationMixin.js

+ 5
- 0
HISTORY.md View File

@ -4,6 +4,11 @@ http://visjs.org
## not yet released, version 3.4.2
### Network
- Changed timings for zoomExtent animation.
- Fixed possible cause of freezing graph when animating.
## 2014-10-11, version 3.4.1

+ 499
- 738
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


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


+ 2
- 1
examples/network/02_random_nodes.html View File

@ -76,12 +76,13 @@
nodes: nodes,
edges: edges
};
var options = {};
var options = {edges:{widthSelectionMultiplier:1}};
network = new vis.Network(container, data, options);
// add event listeners
network.on('select', function(params) {
document.getElementById('selection').innerHTML = 'Selection: ' + params.nodes;
console.log(params)
});
network.on('stabilized', function (params) {
document.getElementById('stabilization').innerHTML = 'Stabilization took ' + params.iterations + ' iterations.';

+ 1
- 0
lib/network/Network.js View File

@ -2357,6 +2357,7 @@ Network.prototype.animateView = function (options) {
this.animationEasingFunction = options.animation.easingFunction;
this._classicRedraw = this._redraw;
this._redraw = this._transitionRedraw;
this._redraw();
this.moving = true;
this.start();
}

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

@ -62,7 +62,7 @@ exports._loadNavigationElements = function() {
*/
exports._zoomExtent = function(event) {
// FIXME: this is a workaround because the binding of Hammer on Document makes this fire twice
if (this._zoomExtentLastTime === undefined || new Date() - this._zoomExtentLastTime > 50) {
if (this._zoomExtentLastTime === undefined || new Date() - this._zoomExtentLastTime > 200) {
this._zoomExtentLastTime = new Date();
this.zoomExtent({duration:800});
event.stopPropagation();

Loading…
Cancel
Save