Skip to content

fix edit colorbarTitleText #7487

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 2 commits into from
Jul 22, 2025
Merged

fix edit colorbarTitleText #7487

merged 2 commits into from
Jul 22, 2025

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Jul 22, 2025

No description provided.

@archmoj archmoj added the bug something broken label Jul 22, 2025
@archmoj archmoj requested a review from emilykl July 22, 2025 15:22
Copy link
Contributor

@emilykl emilykl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add one sentence to the PR description explaining the effect this change has for the end user? (i.e. was editing fully broken before? or it wouldn't save? etc.)

LGTM.

@@ -102,7 +102,7 @@ function draw(gd, titleClass, options) {
var editAttr;
if(prop === 'title.text') editAttr = 'titleText';
else if(prop.indexOf('axis') !== -1) editAttr = 'axisTitleText';
else if(prop.indexOf('colorbar' !== -1)) editAttr = 'colorbarTitleText';
else if(prop.indexOf('colorbar') !== -1) editAttr = 'colorbarTitleText';
Copy link
Contributor Author

@archmoj archmoj Jul 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not able to replicate a bug as a result of this typo.
The typo was present since 2017 from b4e26ae.

The last condition would translate to

else if(prop.indexOf(true)) editAttr = 'colorbarTitleText';

Which is obliviously not what we wanted.

@archmoj archmoj merged commit 694d55b into master Jul 22, 2025
6 checks passed
@archmoj archmoj deleted the fix-colorbarTitleText-case branch July 22, 2025 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants