import * as React from "react"; import { Observable } from "babylonjs"; import { PropertyChangedEvent } from "../../../../propertyChangedEvent"; import { LineContainerComponent } from "../../../lineContainerComponent"; import { TextLineComponent } from "../../../lines/textLineComponent"; import { Control } from "babylonjs-gui/2D/controls/control"; import { SliderLineComponent } from "../../../lines/sliderLineComponent"; import { FloatLineComponent } from "../../../lines/floatLineComponent"; import { TextInputLineComponent } from "../../../lines/textInputLineComponent"; import { LockObject } from "../lockObject"; import { OptionsLineComponent } from "../../../lines/optionsLineComponent"; interface ICommonControlPropertyGridComponentProps { control: Control; lockObject: LockObject; onPropertyChangedObservable?: Observable; } export class CommonControlPropertyGridComponent extends React.Component { constructor(props: ICommonControlPropertyGridComponentProps) { super(props); } render() { const control = this.props.control; var horizontalOptions = [ { label: "Left", value: BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_LEFT }, { label: "Right", value: BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_RIGHT }, { label: "Center", value: BABYLON.GUI.Control.HORIZONTAL_ALIGNMENT_CENTER }, ]; var verticalOptions = [ { label: "Top", value: BABYLON.GUI.Control.VERTICAL_ALIGNMENT_TOP }, { label: "Bottom", value: BABYLON.GUI.Control.VERTICAL_ALIGNMENT_BOTTOM }, { label: "Center", value: BABYLON.GUI.Control.VERTICAL_ALIGNMENT_CENTER }, ]; return (
{ control.color && } { (control as any).background !== undefined && }
); } }