()
| 683 | } |
| 684 | |
| 685 | apply_selected() { |
| 686 | const selected = this.model.get('selected'); |
| 687 | const that = this; |
| 688 | if (selected === undefined || selected === null || selected.length === 0) { |
| 689 | this.clear_selected(); |
| 690 | } else { |
| 691 | selected.forEach((data) => { |
| 692 | const selected_cell = that.fig_map |
| 693 | .selectAll('.rect_element') |
| 694 | .filter((d: any, i) => { |
| 695 | return d.name === data; |
| 696 | }); |
| 697 | |
| 698 | const rect = that.fig_click |
| 699 | .append('rect') |
| 700 | .data(selected_cell.data()) |
| 701 | .attr('transform', selected_cell.attr('transform')) |
| 702 | .attr('x', 0) |
| 703 | .attr('y', 0) |
| 704 | .attr('width', that.column_width) |
| 705 | .attr('height', that.row_height); |
| 706 | applyStyles(rect, { |
| 707 | stroke: that.selected_stroke, |
| 708 | 'stroke-width': '3px', |
| 709 | fill: 'none', |
| 710 | }); |
| 711 | }); |
| 712 | } |
| 713 | } |
| 714 | |
| 715 | clear_selected() { |
| 716 | this.fig_click.selectAll('rect').remove(); |
no test coverage detected