Skip to content

Commit

Permalink
fix panning for ternary lines under cliponaxis: false
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Jul 7, 2017
1 parent 89ee533 commit e4d7889
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plots/ternary/ternary.js
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,8 @@ proto.adjustLayout = function(ternaryLayout, graphSize) {
_this.plotContainer.selectAll('.scatterlayer,.maplayer')
.attr('transform', plotTransform);

_this.clipDefRelative.attr('transform', null);

// TODO: shift axes to accommodate linewidth*sin(30) tick mark angle

var bTransform = 'translate(' + x0 + ',' + (y0 + h) + ')';
Expand Down Expand Up @@ -616,6 +618,9 @@ proto.initInteractions = function() {
_this.plotContainer.selectAll('.scatterlayer,.maplayer')
.attr('transform', plotTransform);

var plotTransform2 = 'translate(' + -dx + ',' + -dy + ')';
_this.clipDefRelative.attr('transform', plotTransform2)

// move the ticks
_this.aaxis.range = [mins.a, _this.sum - mins.b - mins.c];
_this.baxis.range = [_this.sum - mins.a - mins.c, mins.b];
Expand Down

0 comments on commit e4d7889

Please sign in to comment.