Skip to content

let drawTicks method empty ticks on exit #6165

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 1 commit into from
Apr 6, 2022
Merged

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Apr 6, 2022

When ax.ticks is empty, the drawTicks method did not get called to remove ticks on exit here:

var ticks = opts.layer.selectAll('path.' + cls)
.data(ax.ticks ? vals : [], tickDataFn);
ticks.exit().remove();

This PR fixes that by calling drawTicks regardless of ax.ticks value.

cc: @plotly/plotly_js

@archmoj archmoj added the bug something broken label Apr 6, 2022
@@ -2200,33 +2201,33 @@ axes.drawOne = function(gd, ax, opts) {
} else {
tickPath = fullTickPath;
}

axes.drawTicks(gd, ax, {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note this call should be outside if(ax.ticks) { ... } block

@archmoj archmoj added type: maintenance and removed bug something broken labels Apr 6, 2022
@archmoj archmoj merged commit 12a49c0 into master Apr 6, 2022
@archmoj archmoj deleted the fix-ticks-display branch April 6, 2022 21:15
@alexcjohnson
Copy link
Collaborator

Did this fix a visible bug?

@archmoj
Copy link
Contributor Author

archmoj commented Apr 6, 2022

Did this fix a visible bug?

Not that I am aware of.

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

Successfully merging this pull request may close these issues.

2 participants