Skip to content

Commit

Permalink
Correctly mark current state at FSM init
Browse files Browse the repository at this point in the history
  • Loading branch information
tilk committed Apr 30, 2021
1 parent 59e5f29 commit d06a6ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cells/fsm.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ export const FSM = Box.define('FSM', {
const node = new joint.shapes.standard.Circle({stateNo: n, id: 'state' + n, isInit: n == init_state});
node.attr('label/text', String(n));
node.resize(100,50);
if (n == current_state)
node.attr('body/class', 'current_state');
node.addTo(this.fsmgraph);
statenodes.push(node);
}
Expand Down

0 comments on commit d06a6ac

Please # to comment.