Prevent rendering incorrectly in editor on first load if custom font is used (sketch theme)
This commit is contained in:
parent
819d51f856
commit
f0cb8e0ca5
|
@ -313,7 +313,10 @@ define(['require'], (require) => {
|
|||
this.viewPaneInner.appendChild(this.diagram.dom());
|
||||
|
||||
this.registerListeners();
|
||||
this.update();
|
||||
|
||||
// Delay first update 1 frame to ensure render target is ready
|
||||
// (prevents initial incorrect font calculations for custom fonts)
|
||||
setTimeout(this.update.bind(this), 0);
|
||||
}
|
||||
|
||||
addCodeBlock(block) {
|
||||
|
|
Loading…
Reference in New Issue