-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Subplot registration #193
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
Subplot registration #193
Conversation
@@ -41,7 +41,7 @@ plots.fontWeight = 'normal'; | |||
*/ | |||
plots.register = function(_module, thisType, categoriesIn, meta) { | |||
if(modules[thisType]) { | |||
console.warn('type ' + thisType + ' already registered'); | |||
console.log('type ' + thisType + ' already registered'); |
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.
Bringing in @bpostlethwaite and @alexcjohnson
Should we warn (or spit out a console.log) when users register the same plot module twice?
I'd vote for doing nothing at all.
@mdtusz If I'm no mistaken, every time a user registers two or more trace modules that rely on the same plot module e.g.
var PlotlyBar = require('plotly.js/lib/bar');
var PlotlyBox = require('plotly.js/lib/box');
Plotly.register([PlotlyBar, PlotlyBox]);
would split out a log.
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.
Fyi I switched log --> warn out of (perhaps bad) habit, from when I had a project that needed to support ie8 😦
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.
Oh boy. No way plotly.js works in ie8
How are we feeling on this one @etpinard? |
💃 let's merge this in. We can revisit the log vs warn issue later. |
Some slight changes so that the
plot
modules will be loaded along with their respective traces.This will allow us to slim down the bundle size even more in the case where only a few traces (e.g. no gl) are needed.