@willcgage/module-schematic 0.40.0 → 0.41.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 CHANGED
@@ -617,7 +617,11 @@ function buildTransition(state) {
617
617
  // Branton, #131). Main 1 runs the full module; Main 2 is the branch.
618
618
  onTrack: MAIN_TRACK_ID,
619
619
  divergeTrack: MAIN2_TRACK_ID,
620
- kind: aDouble ? "left" : "right"
620
+ // Hand so the diverging leg lands on Main 2's side. Main 2 extends toward
621
+ // the double end (sign −1 west / +1 east) and sits above (+1) or, when the
622
+ // mains are swapped, below (−1). divergeSideForHand(left)=sign(toward),
623
+ // (right)=−sign(toward), so pick the hand whose side matches Main 2's (#131).
624
+ kind: (aDouble ? -1 : 1) === (state.mainsSwapped ? -1 : 1) ? "left" : "right"
621
625
  };
622
626
  const cpId = nextId("cp", state.controlPoints.map((c) => c.id));
623
627
  const sig = (facing) => ({