|
|
|
@ -1,6 +1,5 @@
|
|
|
|
|
|
|
|
|
|
import { Button, Menu, MenuItem, Popover } from "@blueprintjs/core";
|
|
|
|
|
import { observable } from "mobx";
|
|
|
|
|
import { observer } from "mobx-react";
|
|
|
|
|
import * as React from "react";
|
|
|
|
|
import { app } from "../ApplicationServices/Application";
|
|
|
|
@ -16,21 +15,16 @@ import { userConfig } from "./UserConfig";
|
|
|
|
|
@observer
|
|
|
|
|
export class LightsMenu extends React.Component<{ GetLightType: (ent: Entity) => string; }>
|
|
|
|
|
{
|
|
|
|
|
@observable isOpenMenu = false;
|
|
|
|
|
|
|
|
|
|
render()
|
|
|
|
|
{
|
|
|
|
|
return (
|
|
|
|
|
<Popover
|
|
|
|
|
isOpen={this.isOpenMenu && userConfig.lightHelper}
|
|
|
|
|
modifiers={{ arrow: { enabled: false } }}
|
|
|
|
|
onClosed={this.Close}
|
|
|
|
|
disabled={!userConfig.lightHelper}
|
|
|
|
|
>
|
|
|
|
|
<Button
|
|
|
|
|
style={{ fontSize: "11px", textAlign: "center", minHeight: "15px", height: "15px", lineHeight: "1px" }}
|
|
|
|
|
text="灯光助手"
|
|
|
|
|
disabled={!userConfig.lightHelper}
|
|
|
|
|
onClick={() => { this.isOpenMenu = !this.isOpenMenu; }}
|
|
|
|
|
/>
|
|
|
|
|
{this.RenderMenu()}
|
|
|
|
|
</Popover >
|
|
|
|
@ -65,12 +59,6 @@ export class LightsMenu extends React.Component<{ GetLightType: (ent: Entity) =>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private Close = () =>
|
|
|
|
|
{
|
|
|
|
|
let store = DownPanelStore.GetInstance() as DownPanelStore;
|
|
|
|
|
store.Upload();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
private onHook(data: LightsData, downStore: DownPanelStore)
|
|
|
|
|
{
|
|
|
|
|
if (data.mode !== LightDataModeType.A && !data.enable) //有灯光取消打勾时, "全部"取消打勾
|
|
|
|
|