优化:旋转空间时,增加提示信息

pull/1478/head
ChenX 4 years ago
parent 98dc52e233
commit 702dfe0e3a

@ -1,6 +1,7 @@
import { Matrix4 } from "three";
import { app } from "../../ApplicationServices/Application";
import { Log } from "../../Common/Log";
import { Intent } from "../../Common/Toaster";
import { TemplateVisualSpace } from "../../DatabaseServices/Template/ProgramTempate/TemplateVisualSpace";
import { TemplateRecord } from "../../DatabaseServices/Template/TemplateRecord";
import { SelectTempate } from "../../DatabaseServices/Template/TemplateTest";
@ -47,6 +48,12 @@ export async function RotateTemplateSpace(t: TemplateRecord)
t.RXParam.expr = ro.roX;
t.RYParam.expr = ro.roY;
t.RZParam.expr = ro.roZ;
AppToaster.show({
message: "成功旋转当前空间!",
timeout: 5000,
intent: Intent.SUCCESS,
});
}
else
{
@ -73,6 +80,12 @@ export async function RotateTemplateSpace(t: TemplateRecord)
ct.RYParam.expr = ro.roY;
ct.RZParam.expr = ro.roZ;
await t.UpdateTemplateTree();
AppToaster.show({
message: "已经拥有子空间,成功旋转子空间!",
timeout: 5000,
intent: Intent.SUCCESS,
});
return;
}
}
@ -93,6 +106,12 @@ export async function RotateTemplateSpace(t: TemplateRecord)
app.Database.TemplateTable.Append(nt);
t.Children.push(nt.Id);
AppToaster.show({
message: "成功添加一个旋转后的子空间!",
timeout: 5000,
intent: Intent.SUCCESS,
});
}
await t.UpdateTemplateTree();
}
@ -133,8 +152,9 @@ async function GetSpaceCSFrom3Point(): Promise<Matrix4 | undefined>
if (!isPerpendicularityTo(xVec, zVec))
{
AppToaster.show({
message: "x轴和z轴必须垂直!",
timeout: 2000
message: "失败:x轴和z轴必须垂直!",
timeout: 5000,
intent: Intent.DANGER,
});
return;
}

Loading…
Cancel
Save