init: get statemachine code from jsPlumb demo