Skip to content

Commit

Permalink
some DRYing in PlotSchema.get()
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Mar 30, 2018
1 parent 419458c commit 9162265
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/plot_api/plot_schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,12 @@ function getLayoutAttributes() {

if(!_module.layoutAttributes) continue;

if(_module.name === 'cartesian' || _module.name === 'splom') {
handleBasePlotModule(layoutAttributes, _module, 'xaxis');
handleBasePlotModule(layoutAttributes, _module, 'yaxis');
}
else {
if(Array.isArray(_module.attr)) {
for(var i = 0; i < _module.attr.length; i++) {
handleBasePlotModule(layoutAttributes, _module, _module.attr[i]);
}
} else {
var astr = _module.attr === 'subplot' ? _module.name : _module.attr;

handleBasePlotModule(layoutAttributes, _module, astr);
}
}
Expand Down
1 change: 1 addition & 0 deletions src/traces/splom/base_plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ function clean(newFullData, newFullLayout, oldFullData, oldFullLayout, oldCalcda

module.exports = {
name: SPLOM,
attr: Cartesian.attr,
attrRegex: Cartesian.attrRegex,
layoutAttributes: Cartesian.layoutAttributes,
supplyLayoutDefaults: Cartesian.supplyLayoutDefaults,
Expand Down

0 comments on commit 9162265

Please sign in to comment.