8000 Fix colorbar templating for "non-root" colorscales by etpinard · Pull Request #4470 · plotly/plotly.js · GitHub
[go: up one dir, main page]

Skip to content

Fix colorbar templating for "non-root" colorscales #4470

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

Merged
merged 4 commits into from
Jan 7, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix colorbar templating for "non-root" colorscales
- propagate template info into colorscale container
- fix marker_colorscale_template baseline which was botched from
  6a47d66
  • Loading branch information
etpinard committed Jan 7, 2020
commit 6942b1003b9eebfb27ecf77c64e3fd0b8a1f759b
5 changes: 4 additions & 1 deletion src/components/colorscale/defaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ module.exports = function colorScaleDefaults(parentContIn, parentContOut, layout
if(prefix && inTrace) showScaleDflt = hasColorbar(containerIn);

var showScale = coerce(prefix + 'showscale', showScaleDflt);
if(showScale) colorbarDefaults(containerIn, containerOut, layout);
if(showScale) {
if(prefix && template) containerOut._template = template;
colorbarDefaults(containerIn, containerOut, layout);
}
}
};
Binary file modified test/image/baselines/marker_colorscale_template.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
0