Comments (3)
Hmm, I can't reproduce this in IE11 or any of the older versions as simulated in the F12 Developer Tools console. Per the screenshots you submitted with the other bugs you reported, the bl.ocks demo does seem to line wrap text properly in IE11 (although it's still placing it in the wrong box, as you noted). Can you post the code that's generating the example above?
from d3-textwrap.
Hi Vijith,
It will take me a while to isolate that bit of code as I am fire-fighting elsewhere on another project. But my use case was very straightforward - ie it was using your wrapper to post a block. I hadn't touched your code at this point, and the Webkit/FireFox renderings worked correctly. My impression was that the algorithm was getting the wrong information for the length of text in each line, hence the cumulative error. I wondered if the interplay of CSS styles on text was somehow borking this calculation, as I was aware that your example was ok in this respect. My text was sized by Bootstrap http://getbootstrap.com/css/ in the first instance - you might try applying that, and then a font sizing CSS style on top.
However, since my solution worked around the problem so completely I didn't bother analysing the cause further. It seems to me that if you applied my approach (ie fixing the left hand side in the right place, instead of trying to work back towards it at the end of each line) and worked the code through properly instead of just bodging it in as I have, you will be able to simplify that part quite nicely, and get rid of some of your accumulated total handling and be more robust. This is a cop-out, but it is a /working/ cop-out!
(Of course, if you want to get fancy and wrap text in fancy shapes then you will have to put it all back in again - perhaps an exercise for another day. ;-) )
Regards
Will
from d3-textwrap.
I still haven't been able to reproduce this myself, so I'm going to close this issue. Thanks for the feedback though! If you have some sample code that reliably reproduces this problem and it isn't because of Bootstrap, please feel free to drop a comment in here and I'll be happy to reopen it and take a look.
from d3-textwrap.
Related Issues (18)
- wrap_with_tspans method omits single word at end HOT 3
- need help to use the correct syntax of wrapping running text HOT 2
- Problem with existing coordinates. HOT 2
- How to import or require after npm install? HOT 8
- import declarations may only appear at top level of a module HOT 2
- Bower package? HOT 1
- callback function once wrapping complete? HOT 1
- d3 text-wrap plugin changes coordinates HOT 1
- Could not find a declaration file for module d3-textwrap HOT 1
- Import and Export Errors loading in script element
- Build in font formatting
- Demo shows all text in pink box in IE11 HOT 3
- Doesn't select right element when <text> element is not only one within parent HOT 2
- Specify a LICENSE HOT 1
- Center alignment HOT 4
- Can't debug the getbounds function
- textwrap doesn't work with d3.selectAll() HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from d3-textwrap.