Skip to content

Commit 9c2be8d

Browse files
committed
pass dragbox element to mouseEvent
... this reduces the occurance of intermittent failure in the gl2d_click suite on etpinard's laptop
1 parent 0de19be commit 9c2be8d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/jasmine/tests/gl2d_click_test.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -593,17 +593,19 @@ describe('@noCI @gl Test gl2d lasso/select:', function() {
593593

594594
function drag(path) {
595595
var len = path.length;
596+
var el = d3.select(gd).select('rect.nsewdrag').node();
597+
var opts = {element: el};
596598

597599
Lib.clearThrottle();
598-
mouseEvent('mousemove', path[0][0], path[0][1]);
599-
mouseEvent('mousedown', path[0][0], path[0][1]);
600+
mouseEvent('mousemove', path[0][0], path[0][1], opts);
601+
mouseEvent('mousedown', path[0][0], path[0][1], opts);
600602

601603
path.slice(1, len).forEach(function(pt) {
602604
Lib.clearThrottle();
603-
mouseEvent('mousemove', pt[0], pt[1]);
605+
mouseEvent('mousemove', pt[0], pt[1], opts);
604606
});
605607

606-
mouseEvent('mouseup', path[len - 1][0], path[len - 1][1]);
608+
mouseEvent('mouseup', path[len - 1][0], path[len - 1][1], opts);
607609
}
608610

609611
function select(path) {

0 commit comments

Comments
 (0)