Skip to content

Commit de9b1aa

Browse files
committed
Fix noCI tests
1 parent 83b7589 commit de9b1aa

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

src/plot_api/plot_api.js

+6
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,12 @@ Plotly.plot = function(gd, data, layout, config) {
224224
})
225225
.attr('width', fullLayout.width)
226226
.attr('height', fullLayout.height);
227+
228+
fullLayout._glcanvas.filter(function(d) {
229+
return !d.pick;
230+
}).style({
231+
'pointer-events': 'none'
232+
});
227233
}
228234

229235
return Lib.syncOrAsync([

src/plots/cartesian/select.js

-1
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ module.exports = function prepSelect(e, startX, startY, dragOptions, mode) {
262262

263263
throttle.done(throttleID).then(function() {
264264
throttle.clear(throttleID);
265-
266265
if(!dragged && numclicks === 2) {
267266
// clear selection on doubleclick
268267
outlines.remove();

src/plots/gl2d/scene2d.js

+5
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ proto.makeFramework = function() {
157157
mouseContainer.style.position = 'absolute';
158158
mouseContainer.style['pointer-events'] = 'auto';
159159

160+
this.pickCanvas = this.container.querySelector('.gl-canvas-pick');
161+
162+
160163
// append canvas, hover svg and mouse div to container
161164
var container = this.container;
162165
container.appendChild(svgContainer);
@@ -531,8 +534,10 @@ proto.updateTraces = function(fullData, calcData) {
531534
proto.updateFx = function(dragmode) {
532535
// switch to svg interactions in lasso/select mode
533536
if(dragmode === 'lasso' || dragmode === 'select') {
537+
this.pickCanvas.style['pointer-events'] = 'none';
534538
this.mouseContainer.style['pointer-events'] = 'none';
535539
} else {
540+
this.pickCanvas.style['pointer-events'] = 'auto';
536541
this.mouseContainer.style['pointer-events'] = 'auto';
537542
}
538543

test/jasmine/tests/gl2d_click_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ describe('@noCI Test gl2d lasso/select:', function() {
491491
function select(path) {
492492
return new Promise(function(resolve, reject) {
493493
gd.once('plotly_selected', resolve);
494-
setTimeout(function() { reject('did not trigger *plotly_selected*');}, 100);
494+
setTimeout(function() { reject('did not trigger *plotly_selected*');}, 200);
495495
drag(path);
496496
});
497497
}

0 commit comments

Comments
 (0)