|
|
|
@ -83,11 +83,29 @@ export class ModelingStore implements IConfigStore
|
|
|
|
|
observable(this.modelingItems).replace(cof.option as IModelingItem[]);
|
|
|
|
|
for (let i = 0; i < this.modelingItems.length; i++)
|
|
|
|
|
{
|
|
|
|
|
this.UIModelingItems[i].height = this.modelingItems[i].height.toString();
|
|
|
|
|
this.UIModelingItems[i].knifeRad = this.modelingItems[i].knifeRad.toString();
|
|
|
|
|
this.UIModelingItems[i].addLen = this.modelingItems[i].addLen.toString();
|
|
|
|
|
this.UIModelingItems[i].addWidth = this.modelingItems[i].addWidth?.toString() || "0";
|
|
|
|
|
this.UIModelingItems[i].addDepth = this.modelingItems[i].addDepth?.toString() || "0";
|
|
|
|
|
const Item = this.modelingItems[i];
|
|
|
|
|
const Item_UI = this.UIModelingItems[i];
|
|
|
|
|
Item_UI.height = Item.height.toString();
|
|
|
|
|
Item_UI.knifeRad = Item.knifeRad.toString();
|
|
|
|
|
Item_UI.addLen = Item.addLen.toString();
|
|
|
|
|
|
|
|
|
|
//旧版本addWidth/addDepth = undefined 保存配置时未能正确保存
|
|
|
|
|
//undefined会导致拆单时含有槽加长的造型的板件报错
|
|
|
|
|
if (!Item.addWidth)
|
|
|
|
|
{
|
|
|
|
|
Item.addWidth = 0;
|
|
|
|
|
Item_UI.addWidth = "0";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
Item_UI.addWidth = Item.addWidth.toString();
|
|
|
|
|
|
|
|
|
|
if (!Item.addDepth)
|
|
|
|
|
{
|
|
|
|
|
Item.addDepth = 0;
|
|
|
|
|
Item_UI.addDepth = "0";
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
Item_UI.addDepth = Item.addDepth.toString();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|