|
|
|
@ -11,7 +11,7 @@ import { ToplineUrls } from '../../../Common/HostUrl';
|
|
|
|
|
import { inflate, toplineFileIn, getPolylineSVG, deflate } from '../../../Common/SerializeMaterial';
|
|
|
|
|
import { CADFiler } from '../../../DatabaseServices/CADFiler';
|
|
|
|
|
import { ZoomToEntity } from '../../Store/RightPanelStore/BoardEdgesEditor';
|
|
|
|
|
import { commandMachine } from '../../../Editor/CommandMachine';
|
|
|
|
|
import { CommandWrap } from '../../../Editor/CommandMachine';
|
|
|
|
|
import { AppToaster } from '../Toaster';
|
|
|
|
|
import { TopllineManage } from './ToplineManage';
|
|
|
|
|
import { ModalPosition } from '../Modal/ModalInterface';
|
|
|
|
@ -52,8 +52,10 @@ export class ToplineList extends React.Component<IToplineListProps, { isContextM
|
|
|
|
|
this.showContextMenu(e, tpline);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
private exitEditor = () =>
|
|
|
|
|
private exitEditor = async () =>
|
|
|
|
|
{
|
|
|
|
|
app.Editor.ModalManage.DestoryAll();
|
|
|
|
|
await app.Editor.ModalManage.EndExecingCmd();
|
|
|
|
|
if (!this._cameraFiler) return;
|
|
|
|
|
app.Viewer.CameraCtrl.ReadFile(this._cameraFiler);
|
|
|
|
|
TempEditor.End();
|
|
|
|
@ -79,7 +81,7 @@ export class ToplineList extends React.Component<IToplineListProps, { isContextM
|
|
|
|
|
private startEditorTopline = async (tpline) =>
|
|
|
|
|
{
|
|
|
|
|
TempEditor.Start();
|
|
|
|
|
app.Editor.ModalManage.Destory();
|
|
|
|
|
app.Editor.ModalManage.DestoryAll();
|
|
|
|
|
|
|
|
|
|
let data = await PostJson(ToplineUrls.detail, { topline_id: tpline.topline_id });
|
|
|
|
|
|
|
|
|
@ -87,18 +89,20 @@ export class ToplineList extends React.Component<IToplineListProps, { isContextM
|
|
|
|
|
{
|
|
|
|
|
let file = inflate(data.toplines.file);
|
|
|
|
|
let pl = toplineFileIn(file);
|
|
|
|
|
await CommandWrap(() =>
|
|
|
|
|
{
|
|
|
|
|
app.Database.ModelSpace.Append(pl);
|
|
|
|
|
app.Database.hm.lockIndex++;//禁止初始化动作被撤销
|
|
|
|
|
this._cameraFiler = new CADFiler;
|
|
|
|
|
app.Viewer.CameraCtrl.WriteFile(this._cameraFiler);
|
|
|
|
|
ZoomToEntity(pl);
|
|
|
|
|
commandMachine.ExecCommand('fs');
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
message: this.renderToasterMessage(),
|
|
|
|
|
intent: Intent.PRIMARY,
|
|
|
|
|
timeout: 0,
|
|
|
|
|
onDismiss: this.exitEditor
|
|
|
|
|
});
|
|
|
|
|
}, "编辑顶线");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
private handleUpdateTopline = async () =>
|
|
|
|
|