* 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)
| 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'); |
no test coverage detected
searching dependent graphs…