Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

d3 text-wrap plugin changes coordinates #19

Closed
Githamza opened this issue Jul 17, 2019 · 1 comment · Fixed by #25
Closed

d3 text-wrap plugin changes coordinates #19

Githamza opened this issue Jul 17, 2019 · 1 comment · Fixed by #25

Comments

@Githamza
Copy link

I would wrap dynamic text.
I tried to apply what mentioned in doc

let textWrap;
let d3Text1 = d3.selectAll(stations);
textWrap = d3wrap.textwrap().bounds({ height: 100, width: 100 });
d3Text1.call(textWrap); // commenting this will make initial position but no wrap

the plugin is working but the text is getting moved from it's initial position

image

here a reproduction on stackblitz

@sarahghp
Copy link

I also have this problem. It looks like when a foreignObject is created, it is given x and y values of 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants