natus wheel: fix DON/DOFF reset on PRV/NXT return to DONned planet — TDD
_aspectsVisible was set to false when stepping away to a different planet, but the guard `if (item0.name !== _aspectPlanet)` only skipped resetting it on return — it never restored it to true. Replace the conditional with a direct assignment: _aspectsVisible = (item0.name === _aspectPlanet). T11g: navigating away via NXT then back via PRV restores DOFF-active state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -344,12 +344,11 @@ const NatusWheel = (() => {
|
||||
/** Lock-activate a planet by cycle index. */
|
||||
function _activatePlanet(idx) {
|
||||
_clearActive();
|
||||
// Aspect lines persist across planet switches — cleared only by DON or DOFF.
|
||||
// Re-opening the same planet restores _aspectsVisible so DON shows as ×.
|
||||
// _aspectsVisible tracks whether the currently-active planet's aspects are drawn.
|
||||
// Derive it from _aspectPlanet so navigating away and back via PRV/NXT correctly
|
||||
// restores the DOFF state instead of resetting to DON.
|
||||
const item0 = _planetItems[idx];
|
||||
if (item0.name !== _aspectPlanet) {
|
||||
_aspectsVisible = false;
|
||||
}
|
||||
_aspectsVisible = (item0.name === _aspectPlanet);
|
||||
_activeRing = 'planets';
|
||||
_activeIdx = idx;
|
||||
const item = _planetItems[idx];
|
||||
|
||||
Reference in New Issue
Block a user