class MainDashboardView extends EICDomContent { agentTypes = { molecule1:{ type: 'circle', attrs: { r: 10, fill: '#BFB', stroke: "#0A0", strokeWidth: 2, } }, molecule2:{ type: 'circle', attrs: { r: 10, fill: '#BBF', stroke: "#00A", strokeWidth: 2, } } } constructor() { super() Object.assign(this, app.helpers.activeAttributes) //this.tileMarkup = app.Assets.Store.html['/app/assets/html/mailing/tile.html'] } DOMContentLoaded(options) { for(let model in options.models) this[model] = options.models[model] const components = ui.eicfy(this.el) this.setupTriggers(components) this.setupRefs(components) this.ttb = new app.LoadedModules.Threetobus(this.outputs.paper43) this.ttb.init() } DOMContentFocused(options) { // Avoid 2nd refesh on DomContentLoaded if(this.wasBlured){ //this.refreshSearch() } this.wasBlured = false } DOMContentBlured(options) { this.wasBlured = true } createAgent(agentType, id, x, y){ if(!Object.keys(this.agentTypes).includes(agentType)) return this.agentTypes[agentType] const svgAgent = this.snaptobus.snap[this.agentTypes[agentType].type]().attr(this.agentTypes[agentType].attrs) svgAgent.attr({ id: id, cx: x, cy:y, }) } } app.registerClass('MainDashboardView', MainDashboardView)