开发:更新函数名称

pull/1988/head
ChenX 2 years ago
parent 87004795f2
commit 45d422d64b

@ -209,7 +209,9 @@ export class DrawDoorTool
return templateSpace; return templateSpace;
} }
private GetPositionSpace(name: string)
//创建定位空间模块
private CreatePositionSpaceTr(name: string)
{ {
let handleSpace = new TemplateRecord().InitBaseParams(); let handleSpace = new TemplateRecord().InitBaseParams();
handleSpace.Name = name; handleSpace.Name = name;
@ -219,14 +221,14 @@ export class DrawDoorTool
this.AppendTemplateParam('SY', 0, "上下移动", handleSpace); this.AppendTemplateParam('SY', 0, "上下移动", handleSpace);
return handleSpace; return handleSpace;
} }
protected GetHandleTemp(info: IDoorInfo, doorTemp: TemplateRecord) protected CreateHandleTr(info: IDoorInfo, doorTr: TemplateRecord)
{ {
if (info.tempInfo.handleTemp.id && this._idTempMap.has(info.tempInfo.handleTemp.id)) if (info.tempInfo.handleTemp.id && this._idTempMap.has(info.tempInfo.handleTemp.id))
{ {
let handleSpace = this.GetPositionSpace("拉手空间"); let handleSpace = this.CreatePositionSpaceTr("拉手空间");
handleSpace.PYParam.expr = "-____MBH"; handleSpace.PYParam.expr = "-____MBH";
app.Database.TemplateTable.Append(handleSpace); app.Database.TemplateTable.Append(handleSpace);
doorTemp.Children.push(handleSpace.Id); doorTr.Children.push(handleSpace.Id);
let xExpr = ""; let xExpr = "";
switch (this.option.handleHorPos) switch (this.option.handleHorPos)
@ -296,7 +298,7 @@ export class DrawDoorTool
if (info.tempInfo.hingeTemp && info.tempInfo.hingeTemp.id && this._idTempMap.has(info.tempInfo.hingeTemp.id)) if (info.tempInfo.hingeTemp && info.tempInfo.hingeTemp.id && this._idTempMap.has(info.tempInfo.hingeTemp.id))
{ {
if (info.openDir === DoorOpenDir.None) return; if (info.openDir === DoorOpenDir.None) return;
let hingeSpace = this.GetPositionSpace("铰链空间"); let hingeSpace = this.CreatePositionSpaceTr("铰链空间");
let hingeTemp = this._idTempMap.get(info.tempInfo.hingeTemp.id); let hingeTemp = this._idTempMap.get(info.tempInfo.hingeTemp.id);
if (hingeTemp.Objects.length === 0) return; if (hingeTemp.Objects.length === 0) return;
let count = this.option.hingeCount; let count = this.option.hingeCount;

@ -166,7 +166,7 @@ export class DrawLeftRightOpenDoor extends DrawDoorTool
{ {
let rowTemplate = this.GetDoorSpaceTemplate(info, rowHeigh, hasLayerDown, hasLayUp); let rowTemplate = this.GetDoorSpaceTemplate(info, rowHeigh, hasLayerDown, hasLayUp);
let doorTemplate = this.GetDoorTemp(info); let doorTemplate = this.GetDoorTemp(info);
this.GetHandleTemp(info, doorTemplate); this.CreateHandleTr(info, doorTemplate);
this.SetOpenDir(doorTemplate, info); this.SetOpenDir(doorTemplate, info);

@ -168,10 +168,10 @@ export class DrawUpDownOpenDoor extends DrawDoorTool
) )
{ {
let colTemplate = this.GetDoorSpaceTemplate(info, colWidth, hasVerLeft, hasVerRight); let colTemplate = this.GetDoorSpaceTemplate(info, colWidth, hasVerLeft, hasVerRight);
let doorTemplate = this.GetDoorTemp(info); let doorTr = this.GetDoorTemp(info);
this.GetHandleTemp(info, doorTemplate); this.CreateHandleTr(info, doorTr);
this.SetOpenDir(doorTemplate, info); this.SetOpenDir(doorTr, info);
colTemplate.Children.push(doorTemplate.Id); colTemplate.Children.push(doorTr.Id);
return colTemplate; return colTemplate;
} }

Loading…
Cancel
Save