(vertices?)
| 115 | } |
| 116 | |
| 117 | update_mark_selected(vertices?) { |
| 118 | if (vertices === undefined || vertices.length === 0) { |
| 119 | // Reset all the selected in marks |
| 120 | _.each(this.mark_views, (mark_view: any) => { |
| 121 | return mark_view.selector_changed(); |
| 122 | }); |
| 123 | } |
| 124 | const point_selector = function (p) { |
| 125 | for (const l in vertices) { |
| 126 | if (sel_utils.point_in_lasso(p, vertices[l])) { |
| 127 | return true; |
| 128 | } |
| 129 | } |
| 130 | return false; |
| 131 | }; |
| 132 | const rect_selector = function (xy) { |
| 133 | for (const l in vertices) { |
| 134 | if (sel_utils.lasso_inter_rect(xy[0], xy[1], vertices[l])) { |
| 135 | return true; |
| 136 | } |
| 137 | } |
| 138 | return false; |
| 139 | }; |
| 140 | |
| 141 | _.each( |
| 142 | this.mark_views, |
| 143 | (mark_view: any) => { |
| 144 | mark_view.selector_changed(point_selector, rect_selector); |
| 145 | }, |
| 146 | this |
| 147 | ); |
| 148 | } |
| 149 | |
| 150 | relayout() { |
| 151 | super.relayout(); |
no test coverage detected