()
| 21 | |
| 22 | export class IndexSelector extends BaseXSelector { |
| 23 | render() { |
| 24 | super.render(); |
| 25 | this.active = false; |
| 26 | this.dirty = false; |
| 27 | const that = this; |
| 28 | const scale_creation_promise = this.create_scales(); |
| 29 | Promise.all([this.mark_views_promise, scale_creation_promise]).then(() => { |
| 30 | that.line = that.d3el |
| 31 | .append('line') |
| 32 | .attr('class', 'selector indsel') |
| 33 | .attr('x1', 0) |
| 34 | .attr('y1', 0) |
| 35 | .attr('x2', 0) |
| 36 | .attr('y2', that.height) |
| 37 | .attr('stroke-width', that.model.get('line_width')) |
| 38 | .attr('pointer-events', 'none') |
| 39 | .attr('visibility', 'hidden'); |
| 40 | that.color_change(); |
| 41 | |
| 42 | //container for mouse events |
| 43 | that.background = that.d3el |
| 44 | .append('rect') |
| 45 | .attr('x', 0) |
| 46 | .attr('y', 0) |
| 47 | .attr('width', that.width) |
| 48 | .attr('height', that.height) |
| 49 | .attr('class', 'selector selectormouse') |
| 50 | .attr('pointer-events', 'all') |
| 51 | .attr('visibility', 'hidden'); |
| 52 | |
| 53 | that.background |
| 54 | .on('mousemove', _.bind(that.mousemove, that)) |
| 55 | .on('click', _.bind(that.initial_click, that)); |
| 56 | |
| 57 | that.create_listeners(); |
| 58 | that.selected_changed(); |
| 59 | }); |
| 60 | } |
| 61 | |
| 62 | create_listeners() { |
| 63 | super.create_listeners(); |
nothing calls this directly
no test coverage detected