道岔和物理区段的联动拖动
This commit is contained in:
parent
6bd8bf17b9
commit
ac6c8cc137
@ -302,6 +302,11 @@ class SectionPolylineEditPlugin extends PolylineEditPlugin {
|
||||
relation.getRelationParam(this.graphic).param === SectionPort.B
|
||||
);
|
||||
}
|
||||
relations = relations.filter(
|
||||
(relation) =>
|
||||
relation.getOtherGraphic(this.graphic) instanceof Turnout ||
|
||||
relation.getOtherGraphic(this.graphic) instanceof Section
|
||||
);
|
||||
if (!relations.length) return;
|
||||
const points: IPointData[] = [];
|
||||
const otherGraphics = relations.map((relation) =>
|
||||
|
@ -410,6 +410,11 @@ export class TurnoutEditPlugin extends GraphicEditPlugin<Turnout> {
|
||||
relation.getRelationParam(this.graphic).param === TurnoutPort.C
|
||||
);
|
||||
}
|
||||
relations = relations.filter(
|
||||
(relation) =>
|
||||
relation.getOtherGraphic(this.graphic) instanceof Turnout ||
|
||||
relation.getOtherGraphic(this.graphic) instanceof Section
|
||||
);
|
||||
if (!relations.length) return;
|
||||
const otherGraphics = relations.map((relation) =>
|
||||
relation.getOtherGraphic(this.graphic)
|
||||
|
Loading…
Reference in New Issue
Block a user