Skip to content

Commit

Permalink
fix: Jerky zoom start
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikGartner committed Dec 31, 2015
1 parent 51ec554 commit ea184b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class TreeBuilder {
.append('g')
.attr('transform', 'translate(' + width / 2 + ',' + opts.margin.top + ')');

zoom.translate([width / 2, opts.margin.top]);

// Compute the layout.
this.tree = d3.layout.tree()
.nodeSize(nodeSize);
Expand Down

0 comments on commit ea184b5

Please sign in to comment.