Skip to content

Instantly share code, notes, and snippets.

@edgerunner
Created April 17, 2019 13:43
Show Gist options
  • Save edgerunner/70a1e94b93b7947f39478d793a5698fb to your computer and use it in GitHub Desktop.
Save edgerunner/70a1e94b93b7947f39478d793a5698fb to your computer and use it in GitHub Desktop.
Long Press Confirm Button &
Long Press Confirm Button &
Button
release -> Idle
Idle
press -> Pending
Pending
timer done -> Ready
move out -> Pending out
Pending out
move in -> Pending
timer done -> Ready out
Ready
release -> Confirmed
move out -> Ready out
Ready out
move in -> Ready
# final state
Confirmed
Timer
release -> Initial
Initial
press -> Running
Running
timer done -> Done
# final state
Done
function render(model){
let current_state_name = model.active_states.map(s => `${s.parent.name} ${s.name}`);
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment