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

Inconsistent behavior between LabelTTFCanvas and LabelTTFWebGL #986

Open
luisparravicini opened this issue Jun 22, 2013 · 1 comment
Open

Comments

@luisparravicini
Copy link
Contributor

Changing the text of a TTF label, the label's dimension is updated right away in LabelTTFCanvas but on the next visit made to LabelTTFWebGL.

I think both should do the same, or at least specify this difference in the documentation (maybe it's somewhere in the docs, haven't found it).

setString In LabelTTFCanvas:

// Force update
if (this._string.length > 0)
    this._updateTTF();

in LabelTTFWebGL:

// Force update
this._needUpdateTexture = true;
@dingpinglv
Copy link
Contributor

Thanks for your feedback, Luis.

It's expensive for performance in LabelTTFWebGL when it calls _updateTexture(), so we add a _needUpdateTexture flag to save the state.

You're right that the behavior of LabelTTFCanvas and LabelTTFWebGL need to be consistent. We will modify LabelTTFCanvas to make it as a consistent behavior.

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

No branches or pull requests

2 participants