(point_selector, rect_selector)
| 436 | } |
| 437 | |
| 438 | selector_changed(point_selector, rect_selector) { |
| 439 | if (point_selector === undefined) { |
| 440 | this.model.set('selected', null); |
| 441 | this.touch(); |
| 442 | return []; |
| 443 | } |
| 444 | const rowIndices = _.range(this.numRows); |
| 445 | const colIndices = _.range(this.numColumns); |
| 446 | const selCols = _.filter(colIndices, (index) => { |
| 447 | return rect_selector([this.columnPixels[index], []]); |
| 448 | }); |
| 449 | const selRows = _.filter(rowIndices, (index) => { |
| 450 | return rect_selector([[], this.rowPixels[index]]); |
| 451 | }); |
| 452 | let selected = selCols.map((s) => { |
| 453 | return selRows.map((r) => [r, s]); |
| 454 | }); |
| 455 | // @ts-ignore |
| 456 | selected = _.flatten(selected, true); |
| 457 | this.model.set('selected', selected); |
| 458 | this.touch(); |
| 459 | } |
| 460 | |
| 461 | draw() { |
| 462 | this.set_ranges(); |
nothing calls this directly
no test coverage detected