Skip to content

Commit

Permalink
Drag from middle of node, fixes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
bergie committed Oct 15, 2013
1 parent edb26f6 commit 9cddb3e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions the-graph-process/the-graph-process.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ <h1 class="the-graph-process-label">{{label}}</h1>
dragChanged: function () {
var drag = this.getDrag();
var x = drag.x / this.zoom - this.pan.x / this.zoom;
x -= this.clientWidth / 2;
var y = drag.y / this.zoom - this.pan.y / this.zoom;
y -= this.clientHeight / 2;
this.position = x + ' ' + y;
},
nameChanged: function () {
Expand Down

0 comments on commit 9cddb3e

Please sign in to comment.