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
2 changes: 1 addition & 1 deletion src/plots/mapbox/mapbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ proto.updateData = function(calcData) {
traceObj = traceHash[trace.uid];

if(traceObj) traceObj.update(calcTrace);
else {
else if(trace._module) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that visible: false traces do not get fullTrace._module during supply defaults.

traceHash[trace.uid] = trace._module.plot(this, calcTrace);
}
}
Expand Down
6 changes: 6 additions & 0 deletions test/jasmine/tests/mapbox_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,12 @@ describe('mapbox plots', function() {
}).then(function() {
expect(countVisibleTraces(gd, modes)).toEqual(2);

mock.data[0].visible = false;

return Plotly.newPlot(gd, mock.data, mock.layout);
}).then(function() {
expect(countVisibleTraces(gd, modes)).toEqual(1);

done();
});
});
Expand Down