MCPcopy Index your code
hub / github.com/plotly/plotly.js / _click

Function _click

test/jasmine/tests/select_test.js:205–220  ·  view source on GitHub ↗

* Executes a click and before resets selection event handlers. * By default, click is executed with a delay to prevent unwanted double clicks. * Returns the `selectedPromise` promise for convenience.

(x, y, clickOpts, immediate)

Source from the content-addressed store, hash-verified

203 * Returns the `selectedPromise` promise for convenience.
204 */
205 function _click(x, y, clickOpts, immediate) {
206 resetEvents(gd);
207
208 // Too fast subsequent calls of `click` would
209 // produce an unwanted double click, thus we need
210 // to delay the click.
211 if(immediate) {
212 click(x, y, clickOpts);
213 } else {
214 setTimeout(function() {
215 click(x, y, clickOpts);
216 }, DBLCLICKDELAY * 1.03);
217 }
218
219 return selectedPromise;
220 }
221
222 function _clickPt(coords, clickOpts, immediate) {
223 expect(coords).toBeDefined('coords needs to be defined');

Callers 5

_clickPtFunction · 0.70
select_test.jsFile · 0.70
clickFirstBinFunction · 0.70
shiftClickSecondBinFunction · 0.70
shiftClickThirdBinFunction · 0.70

Calls 2

resetEventsFunction · 0.85
clickFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…