(brush_g)
| 609 | } |
| 610 | |
| 611 | reset_handler(brush_g) { |
| 612 | const that = this; |
| 613 | const old_handler = brush_g.on('mousedown.brush'); |
| 614 | |
| 615 | brush_g.on('mousedown.brush', function () { |
| 616 | const accelKey = d3GetEvent().ctrlKey || d3GetEvent().metaKey; |
| 617 | if (d3GetEvent().shiftKey && accelKey) { |
| 618 | that.reset(); |
| 619 | } else if (accelKey) { |
| 620 | add_remove_classes(d3.select(this), ['inactive'], ['active']); |
| 621 | that.create_brush(); |
| 622 | } else if (d3GetEvent().shiftKey && that.selecting_brush === false) { |
| 623 | add_remove_classes( |
| 624 | that.d3el.selectAll('.selector'), |
| 625 | ['visible'], |
| 626 | ['active', 'inactive'] |
| 627 | ); |
| 628 | that.selecting_brush = true; |
| 629 | } else { |
| 630 | add_remove_classes( |
| 631 | that.d3el.selectAll('.selector'), |
| 632 | ['inactive'], |
| 633 | ['visible'] |
| 634 | ); |
| 635 | add_remove_classes(d3.select(this), ['active'], ['inactive']); |
| 636 | old_handler.call(this); |
| 637 | that.selecting_brush = false; |
| 638 | } |
| 639 | }); |
| 640 | } |
| 641 | |
| 642 | get_label(index, arr?) { |
| 643 | //arr is optional. If you do not pass anything, this.names is |
no test coverage detected