GridBackgroundNode¶
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/layout/nodes/GridBackgroundNode.ts for the most up-to-date information.
Overview¶
Displays a background for a given GridConstraint.
NOTE: If there are "holes" in the GridBox/GridConstraint (where there is no cell content for an x/y position), then there will be no background for where those cells (if added) would have been.
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class GridBackgroundNode¶
Constructor¶
new GridBackgroundNode( constraint : GridConstraint, providedOptions? : GridBackgroundNodeOptions )¶
Instance Methods¶
dispose()¶
Releases references
Type GridBackgroundNodeOptions¶
- createCellBackground?: CreateCellBackground
Allows full customization of the background for each cell. The cell is passed in, and can be used in any way to generate the background.cell.lastAvailableBoundsis the bounds to provide.cell.position.horizontalandcell.position.verticalare the row and column indices of the cell.cell.sizecan also be used. - fill?: TPaint
If no createCellBackground is provided, these will be used for the fill/stroke of the Rectangle created for the cells. - stroke?: TPaint
- & NodeOptions
Source Code¶
See the source for GridBackgroundNode.ts in the scenery repository.