Popupable¶
Overview¶
Popupable trait
@author Jonathan Olson <jonathan.olson@colorado.edu> @author Sam Reid (PhET Interactive Simulations) @author Andrea Lin (PhET Interactive Simulations) @author Chris Malley (PixelZoom, Inc.)
Type PopupableNode¶
Type PopupableOptions¶
- showPopup?: ( popup: Node, isModal: boolean ) => void
Don't use PopupableNode here (it creates... a lot of type issues and circularity) - hidePopup?: ( popup: Node, isModal: boolean ) => void
- isModal?: boolean
modal popups prevent interaction with the rest of the sim while open - layoutBounds?: Bounds2 | null
If desired, the layoutBounds that should be used for layout - focusOnShowNode?: Node | null
The Node that receives focus when the Popupable is shown. If null, focus is not set. - focusOnHideNode?: Node | null
The Node that receives focus when the Popupable is closed. If null, focus will return to the Node that had focus when the Dialog opened. - disableModals?: boolean
When true, no modal show/hide feature will be supported. This is a way of opting out of the Popupable feature altogether for this runtime. - & PickOptional<NodeOptions, "tandem">
Source Code¶
See the source for Popupable.ts in the sun repository.