Skip to content

Commit

Permalink
Implement transform.toString.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed May 18, 2016
1 parent 3de9018 commit fc05896
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Transform.prototype = {
},
translate: function(x, y) {
return new Transform(this.k, this.x + this.k * x, this.y + this.k * y);
},
toString: function() {
return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
}
};

Expand Down

0 comments on commit fc05896

Please sign in to comment.