Skip to content
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

Fix scattermapbox update bug #6387

Merged
merged 15 commits into from Dec 7, 2022
Merged

Fix scattermapbox update bug #6387

merged 15 commits into from Dec 7, 2022

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Dec 7, 2022

Fix #6382
@plotly/plotly_js

}

function remove(noSource) {
if(hadCluster) removeCluster(noSource); else removeNonCluster(noSource);
Copy link
Contributor

Choose a reason for hiding this comment

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

not a big deal, but if you really want this to be a one-liner you can collapse it more; otherwise I'd write it as multiple lines. (same in add below)

Suggested change
if(hadCluster) removeCluster(noSource); else removeNonCluster(noSource);
(hadCluster ? removeCluster : removeNonCluster)(noSource);

Copy link
Contributor

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

Whew, looks like a lot of detailed testing went into figuring out all those conditions! Looks good - as discussed we should make a test before you lose track of what was done here, but if you want to publish the patch now and you're confident in your manual testing, feel free to go ahead with it! 💃

@archmoj archmoj merged commit 17e738c into master Dec 7, 2022
@archmoj archmoj deleted the fix6382-scattermapbox-restyle branch December 7, 2022 22:12
@araichev
Copy link

Thanks for the fix, folks.
Is there a way i can incorporate it into my Python Dash apps now, or must i wait for the next release of Dash?

@alexcjohnson
Copy link
Contributor

@araichev Dash 2.7.1, released Monday, includes this fix. But in general, if there's a feature or fix in plotly.js that's been released but not included in Dash yet, you can grab the plotly.js bundle (or even build your own bundle, to get unreleased features or a slimmed-down bundle size) and put it in the assets/ folder of your Dash app https://dash.plotly.com/external-resources#example:-including-local-css-and-javascript

Or include a plotly.js CDN link in external_scripts https://dash.plotly.com/external-resources#adding-external-css/javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scattermapbox restyle bug
3 participants