Small refactor on wegas-statemachinveviewer.js
Fix issue in  wegas-datasource.js when entities are updated through webscocket