You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 25, 2018. It is now read-only.
var sm = new scion.Statechart({
states: [
{
id: 'A',
transitions: [
{
event: 't2',
target: ‘A’ // Using 'History' here has same effect...
}
],
states: [
{
id: 'History',
$type: 'history',
isDeep: true,
transitions: [
{
target: 'A1'
}
]
},
{
id: 'A1',
transitions: [
{
event: 't1',
target: 'A22'
}
]
},
{
id: 'A2',
states: [
{
id: 'A21'
},
{
id: 'A22'
}
]
}
]
}
]
});
sm.start();
alert('Current: ' + sm.getConfiguration()[0]); // A1
sm.gen('t1');
alert('Current: ' + sm.getConfiguration()[0]); // A22
sm.gen('t2'); // Self-transition
alert('Current: ' + sm.getConfiguration()[0]); // A22 expected but A1 is displayed, why?