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

Method update_mark_selected

js/src/FastIntervalSelector.ts:123–155  ·  view source on GitHub ↗
(extent_x, extent_y)

Source from the content-addressed store, hash-verified

121 }
122
123 update_mark_selected(extent_x, extent_y) {
124 if (extent_x === undefined || extent_x.length === 0) {
125 // Reset all the selected in marks
126 _.each(this.mark_views, (mark_view: any) => {
127 return mark_view.selector_changed();
128 });
129 return;
130 }
131 let x, y;
132 if (extent_y === undefined) {
133 // 1d brush
134 const orient = this.model.get('orientation');
135 (x = orient == 'vertical' ? [] : extent_x),
136 (y = orient == 'vertical' ? extent_x : []);
137 } else {
138 // 2d brush
139 (x = extent_x), (y = extent_y);
140 }
141 const point_selector = function (p) {
142 return sel_utils.point_in_rectangle(p, x, y);
143 };
144 const rect_selector = function (xy) {
145 return sel_utils.rect_inter_rect(xy[0], xy[1], x, y);
146 };
147
148 _.each(
149 this.mark_views,
150 (mark_view: any) => {
151 mark_view.selector_changed(point_selector, rect_selector);
152 },
153 this
154 );
155 }
156
157 relayout() {
158 super.relayout();

Callers 3

mousemoveMethod · 0.95
resetMethod · 0.95
selected_changedMethod · 0.95

Calls 1

selector_changedMethod · 0.45

Tested by

no test coverage detected