Skip to content

Commit

Permalink
passes original data object to rotate accessor function
Browse files Browse the repository at this point in the history
  • Loading branch information
nbond211 authored and davelandry committed May 21, 2018
1 parent 41c51ab commit 6d62abe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/TextBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ export default class TextBox extends BaseClass {
fO: this._fontOpacity(d, i),
fW: style["font-weight"],
id: this._id(d, i),
r: this._rotate(d, i),
tA: this._textAnchor(d, i),
widths: wrapResults.widths,
fS, lH, w, h,
Expand Down Expand Up @@ -229,7 +230,7 @@ export default class TextBox extends BaseClass {
function rotate(text) {
text.attr("transform", (d, i) => {
const rotateAnchor = that._rotateAnchor(d, i);
return `translate(${d.x}, ${d.y}) rotate(${that._rotate(d, i)}, ${rotateAnchor[0]}, ${rotateAnchor[1]})`;
return `translate(${d.x}, ${d.y}) rotate(${d.r}, ${rotateAnchor[0]}, ${rotateAnchor[1]})`;
});
}

Expand Down

0 comments on commit 6d62abe

Please sign in to comment.