From 79a19937f3895f29af8d05a9acc15804591df125 Mon Sep 17 00:00:00 2001 From: Marek Materzok Date: Fri, 30 Apr 2021 12:55:24 +0200 Subject: [PATCH] Mark initial state --- src/cells/fsm.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cells/fsm.mjs b/src/cells/fsm.mjs index 94fae22..c17aec9 100644 --- a/src/cells/fsm.mjs +++ b/src/cells/fsm.mjs @@ -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 == init_state) + node.attr('body/strokeWidth', 3) if (n == current_state) node.attr('body/class', 'current_state'); node.addTo(this.fsmgraph);