修复左右侧板UI数据请求延迟导致的绘制错误

pull/547/MERGE
ChenX 5 years ago
parent 7c8f89b081
commit e8afd6b248

@ -21,13 +21,13 @@ export class DrawLeftRight implements Command
app.Editor.ModalManage.Callback = async () =>
{
let data = store.m_Option;
let lenght = data.height;
let height = data.height;
let width = data.width;
let thickness = data.thickness;
let spacing = data.spaceSize;
let leftBoard = JigUtils.Draw(Board.CreateBoard(lenght, width, thickness, BoardType.Vertical));
let rightBoard = JigUtils.Draw(Board.CreateBoard(lenght, width, thickness, BoardType.Vertical));
let leftBoard = JigUtils.Draw(Board.CreateBoard(height, width, thickness, BoardType.Vertical));
let rightBoard = JigUtils.Draw(Board.CreateBoard(height, width, thickness, BoardType.Vertical));
rightBoard.ApplyMatrix(MoveMatrix(new Vector3(spacing - thickness)));
let ptRes = await app.Editor.GetPoint({
@ -45,10 +45,10 @@ export class DrawLeftRight implements Command
let template = new TemplateLeftRightBoardRecord().InitBaseParams();
template.Name = "左右侧板模板";
app.Database.TemplateTable.Append(template);
template.LParam.value = data.spaceSize;
template.WParam.value = data.width;
template.HParam.value = data.height;
template.GetParam("BH").value = data.thickness;
template.LParam.value = spacing;
template.WParam.value = width;
template.HParam.value = height;
template.GetParam("BH").value = thickness;
let vec = ptRes.Point.clone().sub(leftBoard.MinPoint);
leftBoard.ApplyMatrix(MoveMatrix(vec));

Loading…
Cancel
Save