Created
February 28, 2020 14:13
-
-
Save abbas-oveissi/92ffdb3ad2caf07e4df96af695f4836b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (boring == null && isUndefined(desiredWidth) && desiredWidth <= width) { | |
// Is used when the width is not known and the text is not boring, ie. if it contains | |
// unicode characters. | |
layout = new StaticLayout(); | |
} else if (boring != null && boring.width <= width) { | |
// Is used for single-line, boring text when the width is either unknown or bigger | |
// than the width of the text. | |
layout = new BoringLayout(); | |
} else { | |
// Is used for multiline, boring text and the width is known. | |
layout = new StaticLayout(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment