Browse Source

Fixed #953 - Added zoom events from keyboard and navigation buttons.

flowchartTest
Alex de Mulder 8 years ago
parent
commit
4d8ade5c67
3 changed files with 1056 additions and 1048 deletions
  1. +1
    -0
      HISTORY.md
  2. +1048
    -1046
      dist/vis.js
  3. +7
    -2
      lib/network/modules/components/NavigationHandler.js

+ 1
- 0
HISTORY.md View File

@ -15,6 +15,7 @@ http://visjs.org
- Fixed recursion error when node is fixed but has no position.
- Fixed accidental redrawing during stabilization.
- Fixed delete callbacks with null argument not showing toolbar afterwards.
- Added zoom events from keyboard and navigation buttons.
## 2015-06-16, version 4.3.0

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


+ 7
- 2
lib/network/modules/components/NavigationHandler.js View File

@ -145,8 +145,13 @@ class NavigationHandler {
_moveDown() {this.body.view.translation.y -= this.options.keyboard.speed.y;}
_moveLeft() {this.body.view.translation.x += this.options.keyboard.speed.x;}
_moveRight(){this.body.view.translation.x -= this.options.keyboard.speed.x;}
_zoomIn() {this.body.view.scale *= 1+this.options.keyboard.speed.zoom;}
_zoomOut() {this.body.view.scale /= 1+this.options.keyboard.speed.zoom;}
_zoomIn() {
this.body.view.scale *= 1+this.options.keyboard.speed.zoom;
this.body.emitter.emit('zoom', {direction: '+', scale: this.body.view.scale});}
_zoomOut() {
this.body.view.scale /= 1+this.options.keyboard.speed.zoom;
this.body.emitter.emit('zoom', {direction: '-', scale: this.body.view.scale});
}
/**

Loading…
Cancel
Save