!1082 修复:编辑模块问题

pull/1082/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent ea25799b6c
commit 77f8d7eeaf

@ -4,7 +4,7 @@ import { TemplateLatticeRecord } from "../../DatabaseServices/Template/ProgramTe
import { Command } from "../../Editor/CommandMachine";
import { PromptStatus } from "../../Editor/PromptResult";
import { LatticeDrawer } from "../../UI/Components/LatticeDrawer";
import { ModalPosition, ModalState } from "../../UI/Components/Modal/ModalInterface";
import { ModalState } from "../../UI/Components/Modal/ModalInterface";
import { LatticeDrawerStore } from "../../UI/Store/LatticeDrawerStore";
export class EditorLattice implements Command
@ -27,10 +27,13 @@ export class EditorLattice implements Command
let editorTemp = brs[0].Template.Object as TemplateLatticeRecord;
const store = LatticeDrawerStore.GetInstance() as LatticeDrawerStore;
store.EditorTemplate = editorTemp;
store.UpdateOption({ option: editorTemp.Option });
app.Editor.ModalManage.RenderModal(LatticeDrawer, { store });
let res = await app.Editor.ModalManage.Wait();
store.EditorTemplate = undefined;
if (res.Status === ModalState.Cancel)
return;

@ -68,7 +68,7 @@ export enum CommandNames
Substract = "SUBSTRACT",
Pedit = "PEDIT",
Join = "JOIN",
Sweep = "Sweep",
Sweep = "SWEEP",
Cylineder = "CYLINEDER",
LRBoard = "LEFTRIGHTBOARD",
@ -116,7 +116,7 @@ export enum CommandNames
DownloadHoleOption = "DOWNHOLECONFIG",
UploadHoleConfig = "UPLOADHOLECONFIG",
ChaiDan = "CHAIDAN",
ChaiDanJB = "ChAIDANJIABEI",
ChaiDanJB = "CHAIDANJIABEI",
ShowYouhua = "SHOWYOUHUA",
BatchModify = "BATCHMODIFY",

@ -98,6 +98,11 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
return false;
}
};
private handleCancle = () =>
{
this.props.store.EditorTemplate = undefined;
app.Editor.ModalManage.Destory();
};
componentDidMount()
{
this.event =
@ -110,6 +115,9 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
this.handleExec();
e.preventDefault();
}
else if (e.keyCode === KeyBoard.Escape)
this.props.store.EditorTemplate = undefined;
e.stopPropagation();
return true;
});
@ -118,7 +126,6 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
{
this.event();
this.event = null;
}
render()
{
@ -129,11 +136,7 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
className="winerack"
title="酒格"
icon={IconNames.REGRESSION_CHART}
close={() =>
{
this.props.store.EditorTemplate = undefined;
app.Editor.ModalManage.Destory();
}}
close={this.handleCancle}
bodyClass="door"
store={store}
type={BoardModalType.JG}
@ -147,11 +150,7 @@ export class WineRackModal extends React.Component<{ store?: WineRackStore; }, {
<Button
text="取消"
intent={Intent.DANGER}
onClick={() =>
{
this.props.store.EditorTemplate = undefined;
app.Editor.ModalManage.Destory();
}}
onClick={this.handleCancle}
/>
</>
}

@ -1209,17 +1209,17 @@ export const CommandList: ICommand[] = [
chName: "对齐",
chDes: "对齐",
},
// {
// icon: IconEnum.Explode,
// typeId: "util",
// link: "#",
// defaultCustom: "X",
// command: CommandNames.Explode,
// type: "工具",
// chName: "爆炸",
// // enName: "Explode",
// chDes: "将对象炸开",
// },
{
icon: IconEnum.Explode,
typeId: "util",
link: "#",
defaultCustom: "X",
command: CommandNames.Explode,
type: "工具",
chName: "分解",
// enName: "Explode",
chDes: "将对象炸开",
},
// {
// icon: IconEnum.ClosestPoint,
// typeId: "util",
@ -1367,7 +1367,7 @@ export const CommandList: ICommand[] = [
typeId: "file",
link: "#",
defaultCustom: "PU",
command: "PU",
command: CommandNames.Puge,
type: "文件",
chName: "清除历史命令",
chDes: "清除所有历史命令 减小图纸所占空间 慎用",

Loading…
Cancel
Save