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

let drawTicks method empty ticks on exit #6165

Merged
merged 1 commit into from Apr 6, 2022
Merged

let drawTicks method empty ticks on exit #6165

merged 1 commit into from Apr 6, 2022

Conversation

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

@@ -2200,33 +2201,33 @@ axes.drawOne = function(gd, ax, opts) {
} else {
tickPath = fullTickPath;
}

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

@archmoj archmoj Apr 6, 2022

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 merged commit 12a49c0 into master Apr 6, 2022
1 check passed
@archmoj archmoj deleted the fix-ticks-display branch Apr 6, 2022
@alexcjohnson
Copy link
Contributor

@alexcjohnson alexcjohnson commented Apr 6, 2022

Did this fix a visible bug?

@archmoj
Copy link
Contributor Author

@archmoj 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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants