Duplicated isolation name bugfix
*Fixed duplicated isolation names being rendered on switches
This commit is contained in:
parent
df19b92bb2
commit
6d4aef606a
@ -4,6 +4,10 @@ export default function IsolationIdRenderer(props) {
|
||||
const [x, y] = pos.toSVGCoords();
|
||||
const text = object.id_isolation ?? '';
|
||||
|
||||
if (object.hide_isolation || !text) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<text
|
||||
x={x}
|
||||
|
||||
@ -59,6 +59,7 @@ export default class Switch extends SceneryObject {
|
||||
|
||||
this.trackB = this._createGetSwitchTrack(scenery, this.id+"B", this.outs[1], this.outs[3], r);
|
||||
if(this.trackB) {
|
||||
this.trackB.hide_isolation = true; // hide isolation for the second track
|
||||
scenery.addObject(this.trackB);
|
||||
}
|
||||
}
|
||||
|
||||
@ -15,6 +15,7 @@ export default class Track extends SceneryObject {
|
||||
nextTrack = null;
|
||||
start_slope;
|
||||
end_slope;
|
||||
hide_isolation = false;
|
||||
|
||||
constructor(id, pos, rot, len, r, previd, nextid, id_station, start_slope, end_slope, id_isolation, maxspeed, derailspeed) {
|
||||
super(id, pos, rot);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user