Skip to content

Commit 9162265

Browse files
committed
some DRYing in PlotSchema.get()
1 parent 419458c commit 9162265

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/plot_api/plot_schema.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -487,13 +487,12 @@ function getLayoutAttributes() {
487487

488488
if(!_module.layoutAttributes) continue;
489489

490-
if(_module.name === 'cartesian' || _module.name === 'splom') {
491-
handleBasePlotModule(layoutAttributes, _module, 'xaxis');
492-
handleBasePlotModule(layoutAttributes, _module, 'yaxis');
493-
}
494-
else {
490+
if(Array.isArray(_module.attr)) {
491+
for(var i = 0; i < _module.attr.length; i++) {
492+
handleBasePlotModule(layoutAttributes, _module, _module.attr[i]);
493+
}
494+
} else {
495495
var astr = _module.attr === 'subplot' ? _module.name : _module.attr;
496-
497496
handleBasePlotModule(layoutAttributes, _module, astr);
498497
}
499498
}

src/traces/splom/base_plot.js

+1
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ function clean(newFullData, newFullLayout, oldFullData, oldFullLayout, oldCalcda
221221

222222
module.exports = {
223223
name: SPLOM,
224+
attr: Cartesian.attr,
224225
attrRegex: Cartesian.attrRegex,
225226
layoutAttributes: Cartesian.layoutAttributes,
226227
supplyLayoutDefaults: Cartesian.supplyLayoutDefaults,

0 commit comments

Comments
 (0)