Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f8ac787

Browse files
committed
drawing: fixup in translatePoint
- now works as intended for <text> nodes
1 parent fd656dd commit f8ac787

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/drawing/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ drawing.translatePoint = function(d, sel, xa, ya) {
5353

5454
if(isNumeric(x) && isNumeric(y)) {
5555
// for multiline text this works better
56-
if(this.nodeName === 'text') {
57-
sel.node().attr('x', x).attr('y', y);
56+
if(sel.node().nodeName === 'text') {
57+
sel.attr('x', x).attr('y', y);
5858
} else {
5959
sel.attr('transform', 'translate(' + x + ',' + y + ')');
6060
}

0 commit comments

Comments
 (0)