// Generated by CoffeeScript 1.10.0 (function() { var PADDING; PADDING = 20; window.FakeChart = Backbone.D3View.extend({ events: { click: 'change_hue' }, initialize: function() { this.width = this.el.getBoundingClientRect().width; this.height = this.el.getBoundingClientRect().height; this.d3el.append('rect'); this.listenTo(this.model, 'change', this.render); return this.render(); }, render: function() { var color; color = this.model.attributes.hue; this.d3el.select('rect').attr({ x: PADDING, y: PADDING, width: this.width - 2 * PADDING, height: this.height - 2 * PADDING, fill: d3.hcl(color, 40, 60) }); return this.d3el.style({ background: d3.hcl(color, 20, 30) }); }, change_hue: function() { return this.model.change_hue(); } }); }).call(this);