MCPcopy Index your code
hub / github.com/bqplot/bqplot / update_mark_selected

Method update_mark_selected

js/src/LassoSelector.ts:117–148  ·  view source on GitHub ↗
(vertices?)

Source from the content-addressed store, hash-verified

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();

Callers 10

drag_endMethod · 0.95
keydownMethod · 0.95
resetMethod · 0.95
empty_selectionMethod · 0.45
convert_and_saveMethod · 0.45
selected_changedMethod · 0.45
empty_selectionMethod · 0.45
convert_and_saveMethod · 0.45
selected_changedMethod · 0.45
convert_and_saveMethod · 0.45

Calls 1

selector_changedMethod · 0.45

Tested by

no test coverage detected