(point_selector, rect_selector)
| 450 | } |
| 451 | |
| 452 | selector_changed(point_selector, rect_selector) { |
| 453 | if (point_selector === undefined) { |
| 454 | this.model.set('selected', null); |
| 455 | this.touch(); |
| 456 | return []; |
| 457 | } |
| 458 | const pixels = this.pixel_coords; |
| 459 | const indices = new Uint32Array(_.range(pixels.length)); |
| 460 | const selected_bins = indices.filter((index) => { |
| 461 | return rect_selector(pixels[index]); |
| 462 | }); |
| 463 | this.model.set('selected', this.computeDataIndices(selected_bins)); |
| 464 | this.touch(); |
| 465 | } |
| 466 | |
| 467 | private computeDataIndices(indices) { |
| 468 | //input is a list of indices corresponding to the bars. Output is |
no test coverage detected