vijithassar / d3-textwrap

painless cross-browser line wrapping for text passages in SVG projects built with D3.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Demo shows all text in pink box in IE11

willw-git opened this issue · comments

In IE11, the demo http://bl.ocks.org/vijithassar/8278587 always displays in the left hand (pink) box, which ever of the three boxes is clicked. However, the formatted width does correctly reflect the chosen box.

ie11 demo

I had this exact same issue and it's a deal breaker for me. This needs to be fixed for me to use this plugin. There's too many IE users to dismiss them. Otherwise this seems like great plugin in general :)

Found the problem. The x and y of the bounds are ignored totally when foreignObject is used. Here's a version that fixes this problem https://googledrive.com/host/0BxN9lOIYoZDGM2tTa1l3UXMwU3M/d3textwrap.v2.makke.js
Please test it properly! I just wanted to figure out why it didn't work in IE.

Just implemented this change. Thanks for the fix.