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

Method mousePos

js/src/PanZoom.ts:126–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124 }
125
126 mousePos() {
127 if (this.use_css_rotation_workaround) {
128 const mouseEvent = window.event as MouseEvent;
129
130 /* the mouse position is only correct within this.el */
131 if (mouseEvent.target === this.el) {
132 this.last_mouse_pos = [mouseEvent.offsetX, mouseEvent.offsetY];
133 }
134 return this.last_mouse_pos;
135 } else {
136 return d3.mouse(this.el);
137 }
138 }
139
140 mousedown() {
141 this.use_css_rotation_workaround =

Callers 3

mousedownMethod · 0.95
mousemoveMethod · 0.95
mousewheelMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected