question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

V.prototype.text creates text nodes with <tspan x="0" /> after upgrade to joint 1.10

See original GitHub issue

The problematic line in V.prototype.text is:

var x = this.attr('x') || 0;

In my case that causes all custom elements to reset the x coordinate in all text elements. <text> now contains <tspan> elements that have the attribute x="0". That overrides the x values of the parent text node and appears to render all my text left-aligned.

This can be fixed by simply replacing that line with:

var x = this.attr('x');

Tested on Windows 10, Chrome 57

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:13 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
kumilinguscommented, Aug 21, 2017

Fixed in #625.

1reaction
alp82commented, Apr 7, 2017

I will, but cannot do until Monday.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node.textContent - Web APIs | MDN
The textContent property of the Node interface represents the text content of the node and its descendants.
Read more >
Converse.js API Documentation Source: headless/dist ...
IPv6; function bestPresentation(address) { // based on: // Javascript to test an IPv6 address for proper format, and to // present the "best...
Read more >
toggle-switch - UNPKG
n\t\t// Make sure that DOM nodes and window objects don't pass through, ... Utility function for retrieving the text value of an array...
Read more >
Writing R Extensions - The Comprehensive R Archive Network
This is a guide to extending R, describing the process of creating R add-on packages, writing R documentation, R's system and foreign language...
Read more >
Proper way to change a SVG <text> without changing its ...
As I see it you have two options. 1) Building on your last example where you look for the text node. You know...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found