Skip to content

Commit 77fb7e2

Browse files
committed
loop over (trace) modules in trace supplyLayoutDefaults:
- no need to loop over all the registered module, only the ones that appear in the data suffices.
1 parent aa2ec8b commit 77fb7e2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/plots/plots.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,9 +764,9 @@ plots.supplyLayoutModuleDefaults = function(layoutIn, layoutOut, fullData) {
764764
}
765765

766766
// trace module layout defaults
767-
var traceTypes = Object.keys(modules);
768-
for(i = 0; i < traceTypes.length; i++) {
769-
_module = modules[allTypes[i]]._module;
767+
var modules = layoutOut._modules;
768+
for(i = 0; i < modules.length; i++) {
769+
_module = modules[i];
770770

771771
if(_module.supplyLayoutDefaults) {
772772
_module.supplyLayoutDefaults(layoutIn, layoutOut, fullData);

0 commit comments

Comments
 (0)