Skip to content

Commit

Permalink
default anchor : same x,y, and r=0
Browse files Browse the repository at this point in the history
solves tinker10#2
  • Loading branch information
Fil committed Mar 11, 2014
1 parent 603e00e commit e266347
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions labeler.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,12 @@ d3.labeler = function() {
// users insert label positions
if (!arguments.length) return lab;
lab = x;
// default anchor: same x,y, and r=0
for (i in lab) {
if (typeof anc[i] == 'undefined') {
anc[i] = { x: lab[i].x, y: lab[i].y, r:0 };
}
}
return labeler;
};

Expand Down

0 comments on commit e266347

Please sign in to comment.