import * as React from "react"; import { Observable } from "babylonjs/Misc/observable"; import { PropertyChangedEvent } from "../../../propertyChangedEvent"; import { CommonControlPropertyGridComponent } from "../../../tabs/propertyGrids/gui/commonControlPropertyGridComponent"; import { LockObject } from "../../../tabs/propertyGrids/lockObject"; import { Grid } from "babylonjs-gui/2D/controls/grid"; import { LineContainerComponent } from "../../../lines/lineContainerComponent"; import { TextLineComponent } from "../../../lines/textLineComponent"; interface IGridPropertyGridComponentProps { grid: Grid, lockObject: LockObject, onPropertyChangedObservable?: Observable } export class GridPropertyGridComponent extends React.Component { constructor(props: IGridPropertyGridComponentProps) { super(props); } renderRows() { const grid = this.props.grid; const rows = []; for (var index = 0; index < grid.rowCount; index++) { rows.push(grid.getRowDefinition(index)!); } return ( rows.map((rd, i) => { return ( ) }) ); } renderColumns() { const grid = this.props.grid; const cols = []; for (var index = 0; index < grid.columnCount; index++) { cols.push(grid.getColumnDefinition(index)!); } return ( cols.map((cd, i) => { return ( ) }) ); } render() { const grid = this.props.grid; const cols = []; for (var index = 0; index < grid.rowCount; index++) { cols.push(grid.getColumnDefinition(index)); } return (
{ this.renderRows() } { this.renderColumns() }
); } }