// Generated by CoffeeScript 1.10.0 (function() { window.AnnotationView = Backbone.D3View.extend({ namespace: null, tagName: 'div', initialize: function() { this.d3el.attr({ "class": 'AnnotationView' }); return this.listenTo(this.model, 'change:annotations', this.render); }, render: function() { var annotations, annotations_data; annotations_data = this.model.get('annotations'); annotations = this.d3el.selectAll('.annotation').data(annotations_data); annotations.enter().append('table').attr({ "class": 'annotation' }); annotations.html(function(d) { var body, id; id = d.id[0] === '_' ? '' : d.id; body = d.body != null ? d.body : ''; return "" + id + "" + (d.text.replace(/\n/g, '↵')) + "" + body + ""; }); return annotations.exit().remove(); } }); }).call(this);