Browse Source

- Fixed #1036, bug in lockedRedraw. Thanks @vges!

flowchartTest
Alex de Mulder 9 years ago
parent
commit
11b22d3299
3 changed files with 3405 additions and 3404 deletions
  1. +1
    -0
      HISTORY.md
  2. +3403
    -3403
      dist/vis.js
  3. +1
    -1
      lib/network/modules/View.js

+ 1
- 0
HISTORY.md View File

@ -22,6 +22,7 @@ http://visjs.org
- Fixed #987 proper cleaning of support nodes.
- Fixed static smooth edges not fully working from every angle.
- Fixed updating bounding box of nodes without drawing.
- Fixed #1036, bug in lockedRedraw. Thanks @vges!
### Graph2d

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


+ 1
- 1
lib/network/modules/View.js View File

@ -272,7 +272,7 @@ class View {
*/
_lockedRedraw() {
var nodePosition = {x: this.body.nodes[this.lockedOnNodeId].x, y: this.body.nodes[this.lockedOnNodeId].y};
var viewCenter = this.DOMtoCanvas({x: 0.5 * this.frame.canvas.clientWidth, y: 0.5 * this.frame.canvas.clientHeight});
var viewCenter = this.canvas.DOMtoCanvas({x: 0.5 * this.frame.canvas.clientWidth, y: 0.5 * this.frame.canvas.clientHeight});
var distanceFromCenter = { // offset from view, distance view has to change by these x and y to center the node
x: viewCenter.x - nodePosition.x,
y: viewCenter.y - nodePosition.y

Loading…
Cancel
Save