开发:代码样式修改

pull/1504/MERGE
ChenX 3 years ago
parent afaeae33ac
commit 9368a49d96

@ -27,7 +27,7 @@ export class TemplateMoveAction extends TemplateAction
let moveMatrix = MoveMatrix(this._CacheMoveVector);
for (let id of this.MoveEntitys)
{
if (id && id.Object)
if (id?.Object)
{
let ent = id.Object as Entity;
ent.ApplyMatrix(moveMatrix);
@ -46,7 +46,8 @@ export class TemplateMoveAction extends TemplateAction
let count = file.Read();
for (let i = 0; i < count; i++)
{
this.MoveEntitys.push(file.ReadObjectId());
let id = file.ReadObjectId();
if (id) this.MoveEntitys.push(id);
}
}
//对象将自身数据写入到文件.

@ -21,7 +21,7 @@ export class TemplateStretchGripAction extends TemplateMoveAction
super._Update(dist);
for (let { entity, indexs } of this.EntityStretchPointMap)
{
if (entity && entity.Object)
if (entity?.Object)
{
let ent = entity.Object as Entity;
ent.MoveStretchPoints(indexs, this._CacheMoveVector);
@ -41,7 +41,7 @@ export class TemplateStretchGripAction extends TemplateMoveAction
{
let entity = file.ReadObjectId();
let indexs = file.Read();
this.EntityStretchPointMap.push({ entity, indexs });
if (entity) this.EntityStretchPointMap.push({ entity, indexs });
}
}
//对象将自身数据写入到文件.

@ -63,8 +63,7 @@ export class PositioningClampSpace extends Positioning
for (let i = 0; i < count; i++)
{
let id = file.ReadObjectId();
if (id)
this.Objects.push(id);
if (id) this.Objects.push(id);
}
this.SelectBoxIndex = file.Read();

@ -164,6 +164,7 @@ export class ProcessingGroupModal extends React.Component<{ store: ProcessingGro
this.removeFuncs.length = 0;
userConfigStore.SaveConfig(BoardModalType.ProcessGroupCategory, ProcessingGroupModalStore.GetInstance(), { toaster: false });
}
//检查加工类别中有无重复实体
CheckSelect = () =>
{

Loading…
Cancel
Save