Skip to content
This repository
tree: 509eced71f
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 46 lines (40 sloc) 1.845 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
digraph finite_state_machine {
  size="8.3,8"
  rankdir = "LR"
node [fontname=Sans]

  /* Execution Contexts */
  node [shape=Mrecord, fillcolor=beige, style=filled];
  top [label="<__proto__>[ Scope ]|<Controller>Controller|<on>on"];
  closure [label="<__proto__>[ Scope ]|<view>view|<model>model"];

  /* Normal Objects */
  node [shape = Mrecord, fillcolor=lightskyblue, style=filled];
  ob_view [label="<__proto__>[ Object ]|<update>update|<close>close"]
  ob_model [label="<__proto__>[ Object ]|<value>value=5|<save>save"];
  ob_on [label="<__proto__>[ Object ]|<up>up|<down>down|<save>save"];

  /* Function Objects */
  node [shape = Mrecord, fillcolor=orange, style=filled];
  fn_update [label="<__proto__>[update(value)]|\{ console.log(…) \}|<__scope__>[scope]"]
  fn_close [label="<__proto__>[close()]|\{ console.log(…) \}|<__scope__>[scope]"]
  fn_save [label="<__proto__>[save()]|\{ console.log(…) \}"];
  fn_Controller [label="<__proto__>[Controller(model, view)]|\{ view.update(model.value) … \}"]
  fn_onUp [label="<__proto__>[onUp()]|\{ model.value++ … \}|<__scope__>[scope]"];
  fn_onDown [label="<__proto__>[onDown()]|\{ model.value-- … \}|<__scope__>[scope]"];
  fn_onSave [label="<__proto__>[onSave()]|\{ model.save() … \}|<__scope__>[scope]"];

  /* References */
  ob_view:update -> fn_update:__proto__;
  ob_view:close -> fn_close:__proto__;
  ob_model:save -> fn_save:__proto__;
  top:Controller -> fn_Controller:__proto__;
  top:on -> ob_on;
  ob_on:up -> fn_onUp:__proto__;
  ob_on:down -> fn_onDown:__proto__;
  ob_on:save -> fn_onSave:__proto__;
  fn_onUp:__scope__ -> closure;
  fn_onDown:__scope__ -> closure;
  fn_onSave:__scope__ -> closure;
  closure:view -> ob_view:__proto__;
  closure:model -> ob_model:__proto__;

  /* Inheritance Chains */
  edge [style=dashed]
  closure -> top:__proto__;
}
Something went wrong with that request. Please try again.