()
| 36 | |
| 37 | export class Graph extends Mark { |
| 38 | async render() { |
| 39 | const base_creation_promise = super.render(); |
| 40 | |
| 41 | this.selected_style = this.model.get('selected_style'); |
| 42 | this.unselected_style = this.model.get('unselected_style'); |
| 43 | this.selected_indices = this.model.get('selected'); |
| 44 | |
| 45 | this.hovered_style = this.model.get('hovered_style'); |
| 46 | this.unhovered_style = this.model.get('unhovered_style'); |
| 47 | this.hovered_index = !this.model.get('hovered_point') |
| 48 | ? null |
| 49 | : [this.model.get('hovered_point')]; |
| 50 | |
| 51 | this.display_el_classes = ['element']; |
| 52 | this.event_metadata = { |
| 53 | mouse_over: { |
| 54 | msg_name: 'hover', |
| 55 | lookup_data: false, |
| 56 | hit_test: true, |
| 57 | }, |
| 58 | element_clicked: { |
| 59 | msg_name: 'element_click', |
| 60 | lookup_data: false, |
| 61 | hit_test: true, |
| 62 | }, |
| 63 | parent_clicked: { |
| 64 | msg_name: 'background_click', |
| 65 | hit_test: false, |
| 66 | }, |
| 67 | }; |
| 68 | this.displayed.then(() => { |
| 69 | this.parent.tooltip_div.node().appendChild(this.tooltip_div.node()); |
| 70 | this.create_tooltip(); |
| 71 | }); |
| 72 | |
| 73 | this.d3el.attr('class', 'network'); |
| 74 | |
| 75 | this.parent.svg |
| 76 | .append('defs') |
| 77 | .append('marker') |
| 78 | .attr('id', 'arrow') |
| 79 | .attr('refX', 0) |
| 80 | .attr('refY', 3) |
| 81 | .attr('markerWidth', arrowSize) |
| 82 | .attr('markerHeight', arrowSize) |
| 83 | .attr('orient', 'auto') |
| 84 | .append('path') |
| 85 | .attr('class', 'linkarrow') |
| 86 | .attr('d', 'M0,0 L0,6 L9,3 z'); |
| 87 | |
| 88 | await base_creation_promise; |
| 89 | |
| 90 | this.event_listeners = {}; |
| 91 | this.process_interactions(); |
| 92 | this.create_listeners(); |
| 93 | this.compute_view_padding(); |
| 94 | this.draw(); |
| 95 | } |
nothing calls this directly
no test coverage detected