the label width is not updated immediately
I tried using ._updateRenderData(); but it says function not found, I tried on both the node and the label both say function not found.
if I delay the function by one frame I can notice delayed offset visually.
What’s the right function call to update the width?
If you are using v2.4, please try using this._forceUpdateRenderData.
If you are using v3.x, please try using updateRenderData(true). But if you are using v3.0, there is a bug which is fixed in v3.0.1, you can try to upgrade to v3.0.1. Or merge the fixed pr below: