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