Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"gl-contour2d": "^1.1.4",
"gl-error3d": "^1.0.8",
"gl-heatmap2d": "^1.0.4",
"gl-line3d": "^1.1.4",
"gl-line3d": "^1.1.5",
"gl-mat4": "^1.2.0",
"gl-mesh3d": "^2.0.1",
"gl-plot2d": "^1.3.1",
Expand Down
27 changes: 27 additions & 0 deletions test/jasmine/tests/gl3d_plot_interact_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,33 @@ describe('Test gl3d plots', function() {
.then(done);
});

it('@gl should avoid passing empty lines to webgl', function(done) {
var obj;

Plotly.plot(gd, [{
type: 'scatter3d',
mode: 'lines',
x: [1],
y: [2],
z: [3]
}])
.then(function() {
obj = gd._fullLayout.scene._scene.glplot.objects[0];
spyOn(obj.vao, 'draw').and.callThrough();

expect(obj.vertexCount).toBe(0, '# of vertices');

return Plotly.restyle(gd, 'line.color', 'red');
})
.then(function() {
expect(obj.vertexCount).toBe(0, '# of vertices');
// calling this with no vertex causes WebGL warnings,
// see https://github.com/plotly/plotly.js/issues/1976
expect(obj.vao.draw).toHaveBeenCalledTimes(0);
})
.catch(failTest)
.then(done);
});
});

describe('Test gl3d modebar handlers', function() {
Expand Down