|
|
@ -73,6 +73,7 @@ export enum CurDefMtlType
|
|
|
|
Draw = 1,
|
|
|
|
Draw = 1,
|
|
|
|
Wall = 2,
|
|
|
|
Wall = 2,
|
|
|
|
Floor = 3,
|
|
|
|
Floor = 3,
|
|
|
|
|
|
|
|
CeilingFace = 4 //吊顶底面
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
@ -85,6 +86,8 @@ export class Asset extends React.Component<AssetProps, {}>
|
|
|
|
_DivColorRef = React.createRef<HTMLDivElement>();
|
|
|
|
_DivColorRef = React.createRef<HTMLDivElement>();
|
|
|
|
_CurWallMtlIconMarginBottom: number = 2;
|
|
|
|
_CurWallMtlIconMarginBottom: number = 2;
|
|
|
|
_CurFloorMtlIconMarginBottom: number = 2;
|
|
|
|
_CurFloorMtlIconMarginBottom: number = 2;
|
|
|
|
|
|
|
|
_CurCeilingFaceMtlIconMarginBottom: number = 2;
|
|
|
|
|
|
|
|
_CurCeilingFaceMtlIconMarginLeft: number = -17;
|
|
|
|
_NameEl: HTMLDivElement;
|
|
|
|
_NameEl: HTMLDivElement;
|
|
|
|
_RemoveCall: Function[] = [];
|
|
|
|
_RemoveCall: Function[] = [];
|
|
|
|
_RenderIng = false;
|
|
|
|
_RenderIng = false;
|
|
|
@ -303,6 +306,11 @@ export class Asset extends React.Component<AssetProps, {}>
|
|
|
|
app.Database.MaterialTable.CurBoardMtl = material.Id;
|
|
|
|
app.Database.MaterialTable.CurBoardMtl = material.Id;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
case CurDefMtlType.CeilingFace:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
app.Database.MaterialTable.CurBulkCeilingFaceMaterial = material.Id;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}, "设置默认材质");
|
|
|
|
}, "设置默认材质");
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -354,28 +362,46 @@ export class Asset extends React.Component<AssetProps, {}>
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
*多个重叠时改变marginBottom
|
|
|
|
* 图标多个重叠时改变marginBottom
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
_GetIconMarginBottom()
|
|
|
|
_GetIconMarginBottom()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (app.Database.MaterialTable.CurBoardMtl === app.Database.MaterialTable.CurWallMtl)
|
|
|
|
let curBoardMtl = app.Database.MaterialTable.CurBoardMtl;
|
|
|
|
|
|
|
|
let curWallMtl = app.Database.MaterialTable.CurWallMtl;
|
|
|
|
|
|
|
|
let curFloorMtl = app.Database.MaterialTable.CurFloorMtl;
|
|
|
|
|
|
|
|
let curBulkCeilingFaceMaterial = app.Database.MaterialTable.CurBulkCeilingFaceMaterial;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let layers = [0, 0, 0, 0]; //都是第一层
|
|
|
|
|
|
|
|
let mtls = [curBoardMtl, curWallMtl, curFloorMtl, curBulkCeilingFaceMaterial];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < mtls.length; i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this._CurWallMtlIconMarginBottom = 21;
|
|
|
|
for (let j = 0; j < i; j++)
|
|
|
|
if (app.Database.MaterialTable.CurBoardMtl === app.Database.MaterialTable.CurFloorMtl)
|
|
|
|
{
|
|
|
|
this._CurFloorMtlIconMarginBottom = 40;
|
|
|
|
if (i !== j && mtls[i] && mtls[j] && mtls[i] === mtls[j])
|
|
|
|
else
|
|
|
|
layers[i] = layers[i] + 1;
|
|
|
|
this._CurFloorMtlIconMarginBottom = 2;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (app.Database.MaterialTable.CurBoardMtl === app.Database.MaterialTable.CurFloorMtl
|
|
|
|
}
|
|
|
|
|| app.Database.MaterialTable.CurWallMtl === app.Database.MaterialTable.CurFloorMtl)
|
|
|
|
|
|
|
|
|
|
|
|
this._CurWallMtlIconMarginBottom = 2 + layers[1] * 19;
|
|
|
|
|
|
|
|
this._CurFloorMtlIconMarginBottom = 2 + layers[2] * 19;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ---------
|
|
|
|
|
|
|
|
// --------- | X|
|
|
|
|
|
|
|
|
// | X| | X|
|
|
|
|
|
|
|
|
// | X| | X|
|
|
|
|
|
|
|
|
// | X X| | X|
|
|
|
|
|
|
|
|
// --------- ---------
|
|
|
|
|
|
|
|
//默认吊顶图标在第4层时 大图标不用改变位置 小图标放置左边
|
|
|
|
|
|
|
|
if (layers[3] === 3 && !userConfig.isLargeIcon)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this._CurWallMtlIconMarginBottom = 2;
|
|
|
|
this._CurCeilingFaceMtlIconMarginBottom = 2;
|
|
|
|
this._CurFloorMtlIconMarginBottom = 21;
|
|
|
|
this._CurCeilingFaceMtlIconMarginLeft = -34;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this._CurWallMtlIconMarginBottom = 2;
|
|
|
|
this._CurCeilingFaceMtlIconMarginBottom = 2 + layers[3] * 19;
|
|
|
|
this._CurFloorMtlIconMarginBottom = 2;
|
|
|
|
this._CurCeilingFaceMtlIconMarginLeft = -17;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -408,9 +434,10 @@ export class Asset extends React.Component<AssetProps, {}>
|
|
|
|
React.createElement(MenuItem, { onClick: this._HandleApply, text: "应用到当前选择实体" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this._HandleApply, text: "应用到当前选择实体" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this._HighLightEntity, text: "显示应用当前材质的实体" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this._HighLightEntity, text: "显示应用当前材质的实体" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this._ApplyUseCurBrsGoodInfo, text: "一键更新板件板材" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this._ApplyUseCurBrsGoodInfo, text: "一键更新板件板材" }),
|
|
|
|
React.createElement(MenuItem, { onClick: () => this._SetCurDefMtl(CurDefMtlType.Draw), text: "设置为默认板块材质" }),
|
|
|
|
React.createElement(MenuItem, { onClick: () => this._SetCurDefMtl(CurDefMtlType.Draw), text: "设置为板块默认材质" }),
|
|
|
|
React.createElement(MenuItem, { onClick: () => this._SetCurDefMtl(CurDefMtlType.Wall), text: "设置为默认墙体材质" }),
|
|
|
|
React.createElement(MenuItem, { onClick: () => this._SetCurDefMtl(CurDefMtlType.Wall), text: "设置为墙体默认材质" }),
|
|
|
|
React.createElement(MenuItem, { onClick: () => this._SetCurDefMtl(CurDefMtlType.Floor), text: "设置为默认地面材质" }),
|
|
|
|
React.createElement(MenuItem, { onClick: () => this._SetCurDefMtl(CurDefMtlType.Floor), text: "设置为地面默认材质" }),
|
|
|
|
|
|
|
|
React.createElement(MenuItem, { onClick: () => this._SetCurDefMtl(CurDefMtlType.CeilingFace), text: "设置为吊顶底面默认材质" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this._HandleCollection, text: "收藏" }),
|
|
|
|
React.createElement(MenuItem, { onClick: this._HandleCollection, text: "收藏" }),
|
|
|
|
this.props.material === app.Database.DefaultMaterial ? "" : React.createElement(MenuItem, { onClick: this._HandleDelete, text: "删除" }),
|
|
|
|
this.props.material === app.Database.DefaultMaterial ? "" : React.createElement(MenuItem, { onClick: this._HandleDelete, text: "删除" }),
|
|
|
|
);
|
|
|
|
);
|
|
|
@ -448,6 +475,13 @@ export class Asset extends React.Component<AssetProps, {}>
|
|
|
|
style={{ marginBottom: this._CurFloorMtlIconMarginBottom }}
|
|
|
|
style={{ marginBottom: this._CurFloorMtlIconMarginBottom }}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.props.material.objectId === app.Database.MaterialTable.CurBulkCeilingFaceMaterial && <img
|
|
|
|
|
|
|
|
src={`${ICON_CDN}/${IconEnum.HeadCeilingContour}`}
|
|
|
|
|
|
|
|
className='currentMaterialIcon'
|
|
|
|
|
|
|
|
style={{ marginBottom: this._CurCeilingFaceMtlIconMarginBottom, marginLeft: this._CurCeilingFaceMtlIconMarginLeft }}
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
<div
|
|
|
|
style={TextStyle}
|
|
|
|
style={TextStyle}
|
|
|
|