RichTextElement¶
Overview¶
Represents an element in the RichText hierarchy that has child content (renders nothing on its own, but has its own scale, positioning, style, etc.). <span> or <b> are examples of something that would create this.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class RichTextElement¶
Constructor¶
new RichTextElement( isLTR : boolean )¶
Instance Methods¶
initialize( isLTR : boolean ) : this¶
addElement( element : RichTextElement | RichTextLeaf | RichTextNode ) : boolean¶
Adds a child element.
@returns- Whether the item was actually added.
addExtraBeforeSpacing( amount : number )¶
Adds an amount of spacing to the "before" side.
freeToPool()¶
Instance Properties¶
leftSpacing : number¶
The amount of local-coordinate spacing to apply on each side
rightSpacing : number¶
Static Properties¶
pool : Pool¶
(readonly)
Source Code¶
See the source for RichTextElement.ts in the scenery repository.