Commit b89d6431 authored by wuyongsheng's avatar wuyongsheng

hotfix: pdb改为3d效果

parent f7068b9b
......@@ -40,14 +40,17 @@ const DatasetCardTable = (props: IDatasetCardTableProps) => {
};
// 空盒子用于布局
const nullBox = useMemo(() => {
const nullBox = useMemo(
() => {
if (list.length > 4) {
let nullBoxLength = Math.abs(8 - list.length);
return new Array(nullBoxLength).fill("");
} else {
return [];
}
}, [list]);
},
[list]
);
return (
<>
......@@ -69,7 +72,10 @@ const DatasetCardTable = (props: IDatasetCardTableProps) => {
<KekuleView id={`${index}2d`} smi={item.smiles} />
)}
{graphicDimension === "3D" && (
<NglView id={`${index}3d`} content={item.pdb} />
<NglView
id={`${index}3d`}
content={item.pdb3d || item.mol2}
/>
)}
</div>
<div className={style.datasetLiBottom}>
......@@ -134,13 +140,13 @@ const DatasetCardTable = (props: IDatasetCardTableProps) => {
[style.nullBox]: true,
})}
key={index + "null"}
></div>
/>
);
})}
</div>
</>
)}
{list.length === 0 && <NoData text="未搜索到相关数据"></NoData>}
{list.length === 0 && <NoData text="未搜索到相关数据" />}
</>
);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment