8000 Faster trace visibility toggling by etpinard · Pull Request #2837 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content
8000

Faster trace visibility toggling #2837

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
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
  • Loading branch information
etpinard committed Jul 23, 2018
commit 3790734abdf0c6c37f1864cba726ed2493820376
4 changes: 2 additions & 2 deletions src/plots/plots.js
Original file line number Diff line number Diff line change
Expand Up @@ -696,7 +696,7 @@ plots._hasPlotType = function(category) {
if(basePlotModules[i].name === category) return true;
}

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

if(fullTrace.visible === true) Lib.pushUnique(modules, _module);
Lib.pushUnique(modules, _module);
Lib.pushUnique(basePlotModules, fullTrace._module.basePlotModule);

cnt++;
Expand Down
0