()
| 76 | } |
| 77 | |
| 78 | create_new_lasso() { |
| 79 | const lasso = this.d3el |
| 80 | .append('path') |
| 81 | .attr('id', 'l' + ++this.lasso_counter) |
| 82 | .on('click', function () { |
| 83 | //toggle the opacity of lassos |
| 84 | const lasso = d3.select(this); |
| 85 | lasso.classed('selected', !lasso.classed('selected')); |
| 86 | }); |
| 87 | const color = this.model.get('color'); |
| 88 | if (color) { |
| 89 | lasso.style('stroke', color); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | drag_start() { |
| 94 | this.current_vertices = []; |