GithubHelp home page GithubHelp logo

Comments (3)

vijithassar avatar vijithassar commented on August 28, 2024

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.

willw-git avatar willw-git commented on August 28, 2024

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.

vijithassar avatar vijithassar commented on August 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.