HighlightOverlay¶
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/overlays/HighlightOverlay.ts for the most up-to-date information.
Overview¶
An overlay that implements highlights for a Display. This is responsible for drawing the highlights and observing Properties or Emitters that dictate when highlights should become active. A highlight surrounds a Node to indicate that it is in focus or relevant.
@author Jesse Greenberg (PhET Interactive Simulations) @author Jonathan Olson <jonathan.olson@colorado.edu>
Class HighlightOverlay¶
Constructor¶
new HighlightOverlay( display : Display, focusRootNode : Node, DisplayType : typeof Display, providedOptions? : HighlightOverlayOptions )¶
Instance Methods¶
dispose()¶
Releases references
hasHighlight() : boolean¶
Returns whether or not this HighlightOverlay is displaying some highlight.
hasReadingBlockHighlight() : boolean¶
Returns true if there is an active highlight around a ReadingBlock while the voicingManager is speaking its Voicing content.
update()¶
Called by Display, updates this overlay in the Display.updateDisplay call.
Instance Properties¶
domElement : HTMLElement¶
(readonly)
HTML element of the display
Static Methods¶
setInnerHighlightColor( color : TPaint )¶
Set the inner color of all focus highlights.
getInnerHighlightColor() : TPaint¶
Get the inner color of all focus highlights.
setOuterHilightColor( color : TPaint )¶
Set the outer color of all focus highlights.
getOuterHighlightColor() : TPaint¶
Get the outer color of all focus highlights.
setInnerGroupHighlightColor( color : TPaint )¶
Set the inner color of all group focus highlights.
getInnerGroupHighlightColor() : TPaint¶
Get the inner color of all group focus highlights
setOuterGroupHighlightColor( color : TPaint )¶
Set the outer color of all group focus highlight.
getOuterGroupHighlightColor() : TPaint¶
Get the outer color of all group focus highlights.
Type HighlightOverlayOptions¶
- pdomFocusHighlightsVisibleProperty?: TProperty<boolean>
Controls whether highlights related to DOM focus are visible - interactiveHighlightsVisibleProperty?: TProperty<boolean>
Controls whether highlights related to Interactive Highlights are visible - readingBlockHighlightsVisibleProperty?: TProperty<boolean>
Controls whether highlights associated with ReadingBlocks (of the Voicing feature set) are shown when pointerFocusProperty changes
Source Code¶
See the source for HighlightOverlay.ts in the scenery repository.