Skip to content

Commit

Permalink
fix zooming boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
krispo committed Jul 1, 2016
1 parent bb156ed commit 41fc4b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions dist/angular-nvd3.js
Original file line number Diff line number Diff line change
Expand Up @@ -597,13 +597,18 @@

if (scope.chart)
scope.chart.zoomRender = function(){
// reset zoom scale and translate
d3zoom.scale(scale).translate(translate);

// update scale
xScale = scope.chart.xAxis.scale();
yScale = scope.chart.yAxis.scale();
xDomain = scope.chart.xDomain || xScale.domain;
yDomain = scope.chart.yDomain || yScale.domain;
x_boundary = xScale.domain().slice();
y_boundary = yScale.domain().slice();

// update zoom scale
d3zoom.x(xScale).y(yScale);

scope.svg.call(d3zoom);
Expand Down
Loading

0 comments on commit 41fc4b8

Please sign in to comment.