区段边界生成的计轴关联关系调整
This commit is contained in:
parent
e18c605818
commit
816b0a6824
@ -243,13 +243,15 @@ function oneClickAxleCounting() {
|
|||||||
axleCounting.id = GraphicIdGenerator.next();
|
axleCounting.id = GraphicIdGenerator.next();
|
||||||
const offsetX = i == 0 ? -40 : 40;
|
const offsetX = i == 0 ? -40 : 40;
|
||||||
axleCounting.position.set(select.x + offsetX, select.y + 30);
|
axleCounting.position.set(select.x + offsetX, select.y + 30);
|
||||||
const refIndex = i == 0 ? 1 : 0;
|
const ref = select.datas.axleCountingRef;
|
||||||
const ref = select.datas.axleCountingRef[refIndex];
|
for (let j = 0; j < 2; j++) {
|
||||||
const refSection = select.queryStore.queryById(ref.id);
|
if (ref[j].devicePort == i) {
|
||||||
axleCounting.datas.axleCountingRef = [
|
const refSection = select.queryStore.queryById(ref[j].id) as Section;
|
||||||
select.datas.axleCountingRef[refIndex],
|
axleCounting.datas.axleCountingRef = [select.datas.axleCountingRef[j]];
|
||||||
];
|
axleCounting.datas.code = `${refSection.datas.code}-${ref[j].devicePort}`;
|
||||||
axleCounting.datas.code = `${refSection.code}-${ref.devicePort}`;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
const app = drawStore.getDrawApp();
|
const app = drawStore.getDrawApp();
|
||||||
app.addGraphicAndRecord(axleCounting);
|
app.addGraphicAndRecord(axleCounting);
|
||||||
axleCounting.loadRelations();
|
axleCounting.loadRelations();
|
||||||
|
Loading…
Reference in New Issue
Block a user