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 stretch_data=False #227
Conversation
Conflicts: chaco/tests/linearmapper_test_case.py
Trying to follow what is going on. @corranwebster @mdickinson Does this PR make #225 obsolete? |
It's a more comprehensive fix for some further issues which were discovered, which includes @mdickinson's PR. You could either merge #225 and then this one, or just this one. Your choice. |
Thanks. Sorry I didn't realize that this one contained Mark's commits. Make sure to update the description of the PR with nice code snippets like @mdickinson . Pretty please... |
@jonathanrocher In this case the relevant scripts are in the issue that is being fixed: #226 |
How about tests for the case where Maybe this can't happen in normal use. |
That sort of thing could totally happen if the component was moved. When the origin gets changed in the DataView or Plot, what happens there is even worse: it doesn't do a swap of high and low, but instead does a set of And everything (potentially) gets rendered twice because an update happened. sigh |
This works well for our application, @tonysyu @noraderam @jwiggins please have a look to see that fixing the stretch does not break anything on your side. |
As far as I can tell, we never set |
@jonathanrocher Unless there are any other concerns, I think this is ready to merge. |
@jonathanrocher, I have updated the PR and fixed the merged conflicts. I think this PR should be ready to merge |
OK. Will do one last set of local testing and will merge today. |
@jonathanrocher, did you have time to check the PR? |
LGTM. Merging |
Fix stretch_data=False
This is a fix for #226 which includes (or supersedes) #225.
This pulls out the logic for the range adjustments into a utility method
_adjust_range
which is called from thelow_pos
andhigh_pos
listeners in addition to thescreen_bounds
setter it was included in. It also removes the strayabs
causing the traceback in #225.To exercise this PR, you can run the following example script from @mdickinson :
The
stretch_data = False
should lead to the data not being stretched along the y_axis. And this fixes the traceback that the above code leads as described in #225 .