Skip to content

Commit 9532210

Browse files
committedFeb 20, 2018
Lock clearing fill & fix selection
1 parent d604a76 commit 9532210

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed
 

‎src/traces/scattergl/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -947,7 +947,7 @@ function plot(container, subplot, cdata) {
947947
scene.select2d = createScatter(layout._glcanvas.data()[1].regl, {clone: scene.scatter2d});
948948
}
949949

950-
if(scene.scatter2d) {
950+
if(scene.scatter2d && scene.selectBatch && scene.selectBatch.length) {
951951
// update only traces with selection
952952
scene.scatter2d.update(scene.unselectedOptions.map(function(opts, i) {
953953
return scene.selectBatch[i] ? opts : null;

‎test/jasmine/tests/gl2d_plot_interact_test.js

+17-1
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,6 @@ describe('@gl Test gl2d plots', function() {
648648
.then(done);
649649
});
650650

651-
652651
it('should not scroll document while panning', function(done) {
653652
var mock = {
654653
data: [
@@ -773,4 +772,21 @@ describe('@gl Test gl2d plots', function() {
773772
.catch(fail)
774773
.then(done);
775774
});
775+
776+
it('should remove fill2d', function(done) {
777+
var mock = require('@mocks/gl2d_axes_labels2.json');
778+
779+
Plotly.plot(gd, mock.data, mock.layout)
780+
.then(delay(1000))
781+
.then(function() {
782+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 100, 80)[0]).not.toBe(0);
783+
784+
return Plotly.restyle(gd, {fill: 'none'});
785+
})
786+
.then(function() {
787+
expect(readPixel(gd.querySelector('.gl-canvas-context'), 100, 80)[0]).toBe(0);
788+
})
789+
.catch(fail)
790+
.then(done);
791+
});
776792
});

0 commit comments

Comments
 (0)
Please sign in to comment.