Run layout automatically when the layout changes in cytoscapejs.html