Skip to content

Commit 3790734

Browse files
committed
push trace module into fullLayout._modules even if visible:false
- so that gl-based trace can call their plot methods w/ an empty array of traces and just work. - this makes restyle(gd, 'visible', false) work properly for scattergl traces
1 parent 1675047 commit 3790734

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/plots/plots.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,7 @@ plots._hasPlotType = function(category) {
696696
if(basePlotModules[i].name === category) return true;
697697
}
698698

699-
// check trace modules
699+
// check trace modules (including non-visible:true)
700700
var modules = this._modules || [];
701701
for(i = 0; i < modules.length; i++) {
702702
var name = modules[i].name;
@@ -912,7 +912,7 @@ plots.supplyDataDefaults = function(dataIn, dataOut, layout, fullLayout) {
912912
var _module = fullTrace._module;
913913
if(!_module) return;
914914

915-
if(fullTrace.visible === true) Lib.pushUnique(modules, _module);
915+
Lib.pushUnique(modules, _module);
916916
Lib.pushUnique(basePlotModules, fullTrace._module.basePlotModule);
917917

918918
cnt++;

0 commit comments

Comments
 (0)