Skip to content

Commit bf1f65f

Browse files
committed
set gl mouse and plot delay down to 0 zero:
- promise are now returned after initial plot call - still need a 0 zero so that hover labels appear reliably in promise chains.
1 parent aa64e21 commit bf1f65f

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

test/jasmine/tests/gl_plot_interact_test.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ var customMatchers = require('../assets/custom_matchers');
1616
*
1717
*/
1818

19-
var PLOT_DELAY = 200;
20-
var MOUSE_DELAY = 20;
2119
var MODEBAR_DELAY = 500;
2220

2321

@@ -54,10 +52,9 @@ describe('Test gl plot interactions', function() {
5452
destroyGraphDiv();
5553
});
5654

55+
// ...
5756
function delay(done) {
58-
setTimeout(function() {
59-
done();
60-
}, PLOT_DELAY);
57+
setTimeout(done, 0);
6158
}
6259

6360
describe('gl3d plots', function() {
@@ -99,9 +96,7 @@ describe('Test gl plot interactions', function() {
9996

10097
mouseEventScatter3d('mouseover');
10198

102-
setTimeout(function() {
103-
done();
104-
}, MOUSE_DELAY);
99+
delay(done);
105100
});
106101

107102
it('should have', function() {
@@ -139,9 +134,7 @@ describe('Test gl plot interactions', function() {
139134
// with button 1 pressed
140135
mouseEventScatter3d('mouseover', {buttons: 1});
141136

142-
setTimeout(function() {
143-
done();
144-
}, MOUSE_DELAY);
137+
delay(done);
145138
});
146139

147140
it('should have', function() {

0 commit comments

Comments
 (0)