|
|
@ -2,10 +2,11 @@ import React from "react";
|
|
|
|
import { Button } from "@blueprintjs/core";
|
|
|
|
import { Button } from "@blueprintjs/core";
|
|
|
|
import { RightPanelStore } from "../../Store/RightPanelStore/RightPanelStore";
|
|
|
|
import { RightPanelStore } from "../../Store/RightPanelStore/RightPanelStore";
|
|
|
|
import { DownPanelStore, ToolBarType } from "../../Store/DownPanelStore";
|
|
|
|
import { DownPanelStore, ToolBarType } from "../../Store/DownPanelStore";
|
|
|
|
|
|
|
|
import { end } from "xaop";
|
|
|
|
|
|
|
|
import { PropertiesStore } from "../ToolBar/PropertiesStore";
|
|
|
|
|
|
|
|
|
|
|
|
export class RightPanelButton extends React.Component<{ store: RightPanelStore; }, { classname: string; }>
|
|
|
|
export class RightPanelButton extends React.Component<{ store: RightPanelStore; }, { classname: string; }>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
btnEl: Button;
|
|
|
|
|
|
|
|
constructor(props)
|
|
|
|
constructor(props)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
@ -31,7 +32,6 @@ export class RightPanelButton extends React.Component<{ store: RightPanelStore;
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
className={this.state.classname}
|
|
|
|
className={this.state.classname}
|
|
|
|
ref={el => this.btnEl = el}
|
|
|
|
|
|
|
|
small={true}
|
|
|
|
small={true}
|
|
|
|
onClick={this.handleClick}
|
|
|
|
onClick={this.handleClick}
|
|
|
|
icon="eject"
|
|
|
|
icon="eject"
|
|
|
@ -43,7 +43,6 @@ export class RightPanelButton extends React.Component<{ store: RightPanelStore;
|
|
|
|
|
|
|
|
|
|
|
|
export class PropertiesPanelButton extends React.Component<{ store: DownPanelStore; }, { classname: string; }>
|
|
|
|
export class PropertiesPanelButton extends React.Component<{ store: DownPanelStore; }, { classname: string; }>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
btnEl: Button;
|
|
|
|
|
|
|
|
constructor(props)
|
|
|
|
constructor(props)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
super(props);
|
|
|
|
super(props);
|
|
|
@ -51,20 +50,26 @@ export class PropertiesPanelButton extends React.Component<{ store: DownPanelSto
|
|
|
|
classname: "",
|
|
|
|
classname: "",
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.handleClick = this.handleClick.bind(this);
|
|
|
|
this.handleClick = this.handleClick.bind(this);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let propsStore = PropertiesStore.GetInstance();
|
|
|
|
|
|
|
|
end(propsStore, propsStore.Exit, () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.setState({ classname: "" });
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
handleClick()
|
|
|
|
handleClick()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const store = this.props.store;
|
|
|
|
const store = this.props.store;
|
|
|
|
if (store.showToolBar === ToolBarType.both || store.showToolBar === ToolBarType.properties)
|
|
|
|
if (store.showType === ToolBarType.both || store.showType === ToolBarType.properties)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.setState({ classname: "" });
|
|
|
|
this.setState({ classname: "" });
|
|
|
|
store.showToolBar = store.showToolBar === ToolBarType.both ? ToolBarType.toolbar : ToolBarType.none;
|
|
|
|
store.showType ^= ToolBarType.properties;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.setState({ classname: "iconTransBtn" });
|
|
|
|
this.setState({ classname: "iconTransBtn" });
|
|
|
|
store.showToolBar = store.showToolBar === ToolBarType.toolbar ? ToolBarType.both : ToolBarType.properties;
|
|
|
|
store.showType |= ToolBarType.properties;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -74,7 +79,6 @@ export class PropertiesPanelButton extends React.Component<{ store: DownPanelSto
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<Button
|
|
|
|
<Button
|
|
|
|
className={this.state.classname}
|
|
|
|
className={this.state.classname}
|
|
|
|
ref={el => this.btnEl = el}
|
|
|
|
|
|
|
|
small={true}
|
|
|
|
small={true}
|
|
|
|
onClick={this.handleClick}
|
|
|
|
onClick={this.handleClick}
|
|
|
|
icon="eject"
|
|
|
|
icon="eject"
|
|
|
|