- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.9k
Splom zoom perf #2527
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
Splom zoom perf #2527
Changes from 1 commit
02ed2eb
              3ad1eaa
              bb02281
              d07ae70
              468119e
              0979272
              ebb35ce
              f9090b7
              b2ee736
              a0b2574
              d3fe40d
              cc1b3de
              980855c
              f7d637d
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -627,24 +627,22 @@ plots.createTransitionData = function(gd) { | |
| // whether a certain plot type is present on plot | ||
| // or trace has a category | ||
| plots._hasPlotType = function(category) { | ||
| // check plot | ||
| var basePlotModules = this._basePlotModules || []; | ||
| var i; | ||
|  | ||
| // check base plot modules | ||
| var basePlotModules = this._basePlotModules || []; | ||
| for(i = 0; i < basePlotModules.length; i++) { | ||
| var _module = basePlotModules[i]; | ||
|  | ||
| if(_module.name === category) return true; | ||
| if(basePlotModules[i].name === category) return true; | ||
| } | ||
|  | ||
| // check trace | ||
| // check trace modules | ||
| var modules = this._modules || []; | ||
|  | ||
| for(i = 0; i < modules.length; i++) { | ||
| var modulei = modules[i]; | ||
| if(modulei.categories && modulei.categories.indexOf(category) >= 0) { | ||
| return true; | ||
| } | ||
| var name = modules[i].name; | ||
| if(name === category) return true; | ||
| // N.B. this is modules[i] along with 'categories' as a hash object | ||
| var _module = Registry.modules[name]; | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH I've forgotten why we wrapped modules like this in the registry... not a big deal, but would it be better to attach the hash directly to the module, or even make  There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Referencing #2174 where we like to make building custom trace modules more user friendly: 
 So, I'm voting for the status quo. | ||
| if(_module && _module.categories[category]) return true; | ||
| } | ||
|  | ||
| return false; | ||
|  | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so calls like
fullLayout._has('scattergl')just works w/o having to set ascatterglcategory in the trace module.