(brush, extent_x?, extent_y?)
| 73 | } |
| 74 | |
| 75 | function update_mark_selected(brush, extent_x?, extent_y?) { |
| 76 | if (extent_x === undefined || extent_x.length === 0) { |
| 77 | // Reset all the selected in marks |
| 78 | _.each(brush.mark_views, (mark_view: any) => { |
| 79 | return mark_view.selector_changed(); |
| 80 | }); |
| 81 | return; |
| 82 | } |
| 83 | |
| 84 | let x, y; |
| 85 | if (extent_y === undefined) { |
| 86 | // 1d brush |
| 87 | const orient = brush.model.get('orientation'); |
| 88 | (x = orient == 'vertical' ? [] : extent_x), |
| 89 | (y = orient == 'vertical' ? extent_x : []); |
| 90 | } else { |
| 91 | // 2d brush |
| 92 | (x = extent_x), (y = extent_y); |
| 93 | } |
| 94 | |
| 95 | if (x.length) { |
| 96 | x.sort(sort); |
| 97 | } |
| 98 | if (y.length) { |
| 99 | y.sort(sort); |
| 100 | } |
| 101 | |
| 102 | _.each(brush.mark_views, (mark_view: any) => { |
| 103 | mark_view.selector_changed(point_selector(x, y), rect_selector(x, y)); |
| 104 | }); |
| 105 | } |
| 106 | |
| 107 | function adjust_rectangle(brush) { |
| 108 | if (brush.model.get('orientation') == 'vertical') { |
nothing calls this directly
no test coverage detected
searching dependent graphs…