digital watch works
This commit is contained in:
parent
639a296075
commit
6202934ac4
9 changed files with 87 additions and 55 deletions
|
|
@ -169,6 +169,7 @@ export function enterStates(simtime: number, state: ConcreteState, toEnter: Set<
|
|||
|
||||
// exit the given state and all its active descendants
|
||||
export function exitCurrent(simtime: number, state: ConcreteState, rt: EnteredScope): ActionScope {
|
||||
console.log('exitCurrent', state);
|
||||
let {enteredStates, history, ...actionScope} = rt;
|
||||
|
||||
if (enteredStates.has(state.uid)) {
|
||||
|
|
@ -297,6 +298,8 @@ export function fireTransition(simtime: number, t: Transition, ts: Map<string, T
|
|||
|
||||
const srcPath = computePath({ancestor: arena, descendant: t.src as ConcreteState}).reverse() as ConcreteState[];
|
||||
|
||||
console.log('arena:', arena, 'srcPath:', srcPath);
|
||||
|
||||
// exit src and other states up to arena
|
||||
({environment, history, ...rest} = exitCurrent(simtime, srcPath[0], {environment, enteredStates: mode, history, ...rest}))
|
||||
const toExit = getDescendants(arena);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue