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

Method mousemove

js/src/IndexSelector.ts:83–99  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 }
82
83 mousemove() {
84 if (!this.active || this.dirty) {
85 return;
86 }
87 this.dirty = true;
88 const mouse_pos = d3.mouse(this.background.node());
89 const xpixel = mouse_pos[0];
90 //update the index vertical line
91 this.line.attr('x1', xpixel).attr('x2', xpixel);
92
93 this.set_selected('selected', [this.invert_pixel(xpixel)]);
94 _.each(this.mark_views, (mark_view: any) => {
95 mark_view.invert_point(xpixel);
96 });
97 this.touch();
98 this.dirty = false;
99 }
100
101 invert_pixel(pixel) {
102 return this.scale.invert(pixel);

Callers

nothing calls this directly

Calls 2

invert_pixelMethod · 0.95
invert_pointMethod · 0.45

Tested by

no test coverage detected