Skip to content

Instantly share code, notes, and snippets.

@nathan-muir
Last active September 6, 2018 01:21
Show Gist options
  • Save nathan-muir/40fd72c3f6bb7e410e865afd9a7bb5d0 to your computer and use it in GitHub Desktop.
Save nathan-muir/40fd72c3f6bb7e410e865afd9a7bb5d0 to your computer and use it in GitHub Desktop.
Off
Off
Boot -> Startup
Startup
success? -> Waiting
failure? -> Error
Waiting
choose plan -> Loading
Shutdown -> Off
Loading
success? -> On
failure? -> Error
abort? -> Waiting
Error
Recover -> Startup
Shutdown -> Off
Close -> Waiting
On
Close -> Waiting
Shutdown -> Off
Click Viewer button -> Tool_Viewer
Click Browse button -> Tool_Browse_Choose
Click Eraser button -> Tool_Eraser_Rect
Click Ruler button -> Tool_Ruler
Tool_Viewer
begin panning -> Tool_Viewer_Panning
Tool_Viewer_Panning
end panning -> Tool_Viewer
Tool_Browse_Choose
choose element -> Choose?
begin destroying -> Tool_Browse_Destroy
begin panning -> Tool_Browse_Choose_Panning
# Note: Should there be a "Panning" sub-state, or a more generic "Paused" or "Off" sub-state?
Tool_Browse_Choose_Panning
end panning -> Tool_Browse_Choose
Tool_Browse_Destroy
end destroying -> Tool_Browse_Choose
begin panning -> Tool_Browse_Destroy_Panning
Tool_Browse_Destroy_Panning
end panning -> Tool_Browse_Destroy
Tool_Eraser?
rect? -> Tool_Eraser_Rect
pen? -> Tool_Eraser_Pen
Tool_Eraser_Rect
begin drawing -> Tool_Eraser_Rect_Drawing
begin panning -> Tool_Eraser_Rect_Panning
begin destroy -> Tool_Eraser_Destroy
Tool_Eraser_Rect_Drawing
end drawing -> Tool_Eraser_Rect
Tool_Eraser_Rect_Panning
end panning -> Tool_Eraser_Rect
Tool_Eraser_Pen
begin drawing -> Tool_Eraser_Pen_Drawing
begin panning -> Tool_Eraser_Pen_Panning
begin destroy -> Tool_Eraser_Destroy
Tool_Eraser_Pen_Drawing
end drawing -> Tool_Eraser_Pen
Tool_Eraser_Pen_Panning
end panning -> Tool_Eraser_Pen
Tool_Eraser_Destroy
end destroying -> Tool_Eraser?
begin panning -> Tool_Eraser_Destroy_Panning
Tool_Eraser_Destroy_Panning
end panning -> Tool_Eraser_Destroy
Tool_Ruler
Tool_Ruler_Edit
Tool_Pen
Tool_Arc
Tool_Text
Tool_Image
Tool_Count
Tool_Length
Tool_Area
Tool_Scale
Tool_Section
Tool_Snip
Tool_legend
# Meta: Activate edit tool for chosen item
Choose?
chose ruler? -> Tool_Ruler_Edit
function render(model){
let current_state_name = model.active_states[0].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