| 429 | } |
| 430 | |
| 431 | hover_handler(args) { |
| 432 | const data = args.data; |
| 433 | const index = args.index; |
| 434 | const highlight_links = this.model.get('highlight_links'); |
| 435 | |
| 436 | if (highlight_links) { |
| 437 | this.links.style('opacity', (d) => { |
| 438 | return d.source.label === data.label || d.target.label === data.label |
| 439 | ? 1 |
| 440 | : 0.1; |
| 441 | }); |
| 442 | } else { |
| 443 | this.links.style('opacity', 1); |
| 444 | } |
| 445 | |
| 446 | this.model.set('hovered_point', index, { updated_view: this }); |
| 447 | this.touch(); |
| 448 | } |
| 449 | |
| 450 | reset_selection() { |
| 451 | this.model.set('selected', null); |