AxisManager: Improve AutoScale() support for inverted axes#4110
Merged
swharden merged 3 commits intoScottPlot:mainfrom Jul 27, 2024
Merged
AxisManager: Improve AutoScale() support for inverted axes#4110swharden merged 3 commits intoScottPlot:mainfrom
AutoScale() support for inverted axes#4110swharden merged 3 commits intoScottPlot:mainfrom
Conversation
…ameters passed in. Therefore, input parameters should default to null
AutoScale() support for inverted axes
Member
|
Great catch @BrianAtZetica, thanks! This will be in the next release 🚀 |
Contributor
|
@BrianAtZetica Thank you very much! It was necessary. |
|
It seems that the bug fix applied here got lost again in a later release. In 5.0.43 any Mouse action restores the axes to their default orientation. |
Member
Thanks for pointing this out @wi-fr! I opened #4471 to track reproducing and fixing this issue in the relatively new user input processor. The new system allows automated testing, so we can add tests to ensure this behavior is implemented and does not experience regression again in the future 👍 |
swharden
added a commit
that referenced
this pull request
Nov 9, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When axes are set to inverted and then an AutoScale is initiated (i.e. middle mouse button) the plot was restoring the axes back to normal directions.
This was caused by the optional parameters on AutoScale being defaulted to false instead of null.
The subsequent use of the null-coalescing operator '??' was therefore having no purpose.
Now the default is null, so if no local parameters are provided AutoScaler parameters are used to decide on axis direction