PDOMInstance¶
Under Construction
This documentation is auto-generated, and is a work in progress. Please see the source code at https://github.com/phetsims/scenery/blob/main/js/accessibility/pdom/PDOMInstance.ts for the most up-to-date information.
Overview¶
An instance that is synchronously created, for handling accessibility needs.
Consider the following example:
We have a node structure: A B ( accessible ) C (accessible ) D E (accessible) G (accessible) F H (accessible)
Which has an equivalent accessible instance tree: root AB ABC ABCDE ABCDEG ABCDFH
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class PDOMInstance¶
Constructor¶
new PDOMInstance( parent : PDOMInstance | null, display : Display, trail : Trail )¶
Instance Methods¶
initializePDOMInstance( parent : PDOMInstance | null, display : Display, trail : Trail ) : PDOMInstance¶
Initializes a PDOMInstance, implements construction for pooling.
@param parent - null if this PDOMInstance is root of PDOMInstance tree @param display @param trail - trail to node for this PDOMInstance @returns - Returns 'this' reference, for chaining
addConsecutiveInstances( pdomInstances : PDOMInstance[] )¶
Adds a series of (sorted) accessible instances as children.
removeInstancesForTrail( trail : Trail )¶
Removes any child instances that are based on the provided trail.
removeAllChildren()¶
Removes all of the children.
findChildWithTrail( trail : Trail ) : PDOMInstance | null¶
Returns a PDOMInstance child (if one exists with the given Trail), or null otherwise.
isGloballyVisible() : boolean¶
Returns whether the parallel DOM for this instance and its ancestors are not hidden.
updateTransformTracker( pdomTransformSourceNode : Node | null )¶
Create a new TransformTracker that will observe transforms along the trail of this PDOMInstance OR the provided pdomTransformSourceNode. See ParallelDOM.setPDOMTransformSourceNode(). The The source Node must not use DAG so that its trail is unique.
getPDOMInstanceUniqueId() : string¶
Depending on what the unique ID strategy is, formulate the correct id for this PDOM instance.
toString() : string¶
For debugging purposes.
freeToPool()¶
Instance Properties¶
parent : PDOMInstance | null¶
trail : Trail | null¶
isRootInstance : boolean¶
node : Node | null¶
children : PDOMInstance[]¶
peer : PDOMPeer | null¶
Static Properties¶
pool : Pool¶
(readonly)
Source Code¶
See the source for PDOMInstance.ts in the scenery repository.