()
| 438 | } |
| 439 | |
| 440 | selected_changed() { |
| 441 | if (this.brushing) { |
| 442 | return; |
| 443 | } |
| 444 | //reposition the interval selector and set the selected attribute. |
| 445 | const selected = this.model.get('selected') || []; |
| 446 | if (selected.length === 0) { |
| 447 | this.update_mark_selected(); |
| 448 | } else if (selected.length != 2) { |
| 449 | // invalid value for selected. Ignoring the value |
| 450 | return; |
| 451 | } else { |
| 452 | const extent = [selected[0], selected[1]]; |
| 453 | const pixel_extent = extent.map((v) => this.scale.scale(v)).sort(sort); |
| 454 | this.update_mark_selected(pixel_extent); |
| 455 | } |
| 456 | this.syncModelToBrush(); |
| 457 | } |
| 458 | |
| 459 | relayout() { |
| 460 | super.relayout(); |
no test coverage detected