微调
This commit is contained in:
parent
4794c99fbf
commit
fcc864241b
@ -370,25 +370,26 @@ function buildAbsorbablePositions(
|
||||
break;
|
||||
}
|
||||
}
|
||||
const sections = section.queryStore
|
||||
.queryByType<Section>(Section.Type)
|
||||
.filter((g) => g.datas.sectionType == SectionType.Physical);
|
||||
sections.forEach((item) => {
|
||||
if (item.id !== section.id) {
|
||||
item.localToCanvasPoints(...item.datas.points).forEach((p) => {
|
||||
aps.push(new AbsorbablePoint(p));
|
||||
});
|
||||
}
|
||||
});
|
||||
const turnouts = section.queryStore.queryByType<Turnout>(Turnout.Type);
|
||||
turnouts.forEach((turnout) => {
|
||||
turnout.getPortPoints().forEach((points) => {
|
||||
turnout.localToCanvasPoints(...points).forEach((p) => {
|
||||
aps.push(new AbsorbablePoint(p));
|
||||
if (section instanceof Section) {
|
||||
const sections = section.queryStore
|
||||
.queryByType<Section>(Section.Type)
|
||||
.filter((g) => g.datas.sectionType == SectionType.Physical);
|
||||
sections.forEach((item) => {
|
||||
if (item.id !== section.id) {
|
||||
item.localToCanvasPoints(...item.datas.points).forEach((p) => {
|
||||
aps.push(new AbsorbablePoint(p));
|
||||
});
|
||||
}
|
||||
});
|
||||
const turnouts = section.queryStore.queryByType<Turnout>(Turnout.Type);
|
||||
turnouts.forEach((turnout) => {
|
||||
turnout.getPortPoints().forEach((points) => {
|
||||
turnout.localToCanvasPoints(...points).forEach((p) => {
|
||||
aps.push(new AbsorbablePoint(p));
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
return aps;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user