wordWrap on Text : Always adds a blank line?

Recommended Posts


I created a little routine that shows the bounding boxes of a circle and a bit of text I've rendered inside it. Whenever I turn "wordWrap" on, I get an extra line on the text. Is this behavior by design? If so, could we get a way of detecting how large the blank line is so we can recenter vertically, as needed? I can kind of fake it by remembering the original line height, but that doesn't account for spacing.







Share this post

Link to post
Share on other sites

I've submitted a fix for this, but in the meantime you can stop it happening by editing the wordWrap function in Text.js and put this bit at the end:

        if (i < lines.length-1)        {            result += '\n';        }

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.