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 { Line } from "babylonjs-gui/2D/controls/line"; import { LineContainerComponent } from "../../../lines/lineContainerComponent"; import { FloatLineComponent } from "../../../lines/floatLineComponent"; import { TextInputLineComponent } from "../../../lines/textInputLineComponent"; interface ILinePropertyGridComponentProps { line: Line, lockObject: LockObject, onPropertyChangedObservable?: Observable } export class LinePropertyGridComponent extends React.Component { constructor(props: ILinePropertyGridComponentProps) { super(props); } onDashChange(value: string) { const line = this.props.line; const split = value.split(","); line.dash = []; split.forEach(v => { const int = parseInt(v); if (isNaN(int)) { return; } line.dash.push(int); }); } render() { const line = this.props.line; return (
this.onDashChange(newValue)} />
); } }