一键生成继电器修改:增加边界条件的判断
This commit is contained in:
parent
e2ac7e4ae5
commit
0a2641c20f
@ -435,7 +435,11 @@ export function creatCiCjListByCombinationtype(
|
|||||||
ciCjList.cjList[i] = new relayCabinetGraphicData.CjDataSet();
|
ciCjList.cjList[i] = new relayCabinetGraphicData.CjDataSet();
|
||||||
ciCjList.cjList[i].name = 'D' + (i + 1);
|
ciCjList.cjList[i].name = 'D' + (i + 1);
|
||||||
for (let j = 0; j < rows; j++) {
|
for (let j = 0; j < rows; j++) {
|
||||||
if (i < cols - 1 || (i == cols - 1 && j < allCjData.length % rows)) {
|
if (
|
||||||
|
i < cols - 1 ||
|
||||||
|
(i == cols - 1 && j < allCjData.length % rows) ||
|
||||||
|
(i == cols - 1 && allCjData.length % rows == 0)
|
||||||
|
) {
|
||||||
ciCjList.cjList[i].bitList[j] = allCjData[i * rows + j];
|
ciCjList.cjList[i].bitList[j] = allCjData[i * rows + j];
|
||||||
} else {
|
} else {
|
||||||
ciCjList.cjList[i].bitList[j] = new relayCabinetGraphicData.CjData();
|
ciCjList.cjList[i].bitList[j] = new relayCabinetGraphicData.CjData();
|
||||||
|
Loading…
Reference in New Issue
Block a user