@willcgage/module-schematic 0.43.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1242,12 +1242,17 @@ function moduleFeatures(doc) {
|
|
|
1242
1242
|
laneA: trackLane.get(x.tracks?.[0] ?? "") ?? 0,
|
|
1243
1243
|
laneB: trackLane.get(x.tracks?.[1] ?? "") ?? 1
|
|
1244
1244
|
}));
|
|
1245
|
-
const branchConnectors = doc.endplates.filter(
|
|
1246
|
-
id
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1245
|
+
const branchConnectors = doc.endplates.filter(
|
|
1246
|
+
(e) => e.id !== "A" && e.id !== "B" && e.at && !!e.trackId && (doc.tracks ?? []).some((t) => t.id === e.trackId)
|
|
1247
|
+
).map((e) => {
|
|
1248
|
+
const sw = (doc.turnouts ?? []).find((t) => t.divergeTrack === e.trackId);
|
|
1249
|
+
return {
|
|
1250
|
+
id: e.id,
|
|
1251
|
+
label: e.label ?? e.id,
|
|
1252
|
+
posFrac: clampFrac(sw ? sw.pos : e.at.pos),
|
|
1253
|
+
side: e.at.side === "down" ? "down" : "up"
|
|
1254
|
+
};
|
|
1255
|
+
});
|
|
1251
1256
|
const industries = (doc.industries ?? []).flatMap((ind) => {
|
|
1252
1257
|
const spots = [
|
|
1253
1258
|
{ track: ind.track, fromPos: ind.fromPos, toPos: ind.toPos, side: ind.side },
|