// Generated by CoffeeScript 1.10.0 (function() { window.ItemView = Backbone.D3View.extend({ namespace: null, tagName: 'div', events: { 'click': 'suicide' }, initialize: function() { this.d3el.classed('item', true); this.listenTo(this.model, 'change', this.render); return this.listenTo(this.model, 'destroy', this.remove); }, render: function() { this.d3el.text(this.model.get('string')); return this.d3el.style({ background: d3.hcl.apply(this, this.model.get('color')) }); }, suicide: function() { return this.model.destroy(); } }); }).call(this);