{{ message }}
Allow Selectors to be dragged from anywhere within their patch - #19657
Merged
Merged
Conversation
dstansby
force-pushed
the
selector-dragging
branch
from
March 6, 2021 17:45
78160ab to
e8905ad
Compare
Contributor
dstansby
force-pushed
the
selector-dragging
branch
from
April 4, 2021 10:48
e8905ad to
bbf32b8
Compare
QuLogic
reviewed
Apr 6, 2021
timhoffm
reviewed
Apr 7, 2021
dstansby
force-pushed
the
selector-dragging
branch
from
April 8, 2021 14:23
832d55e to
0c35d09
Compare
4 tasks
timhoffm
approved these changes
Apr 15, 2021
QuLogic
reviewed
Apr 16, 2021
QuLogic
left a comment
Member
There was a problem hiding this comment.
I think you may have rebased and reverted the changes I suggested.
|
|
||
| @pytest.mark.parametrize('drag_from_anywhere, new_center', | ||
| [[True, (60, 75)], | ||
| [False, (30, 20)]]) |
Member
There was a problem hiding this comment.
If you're not dragging from the center, and you didn't enable the new option, why is the center now (30, 20) instead of remaining at (50, 65)?
Member
Author
There was a problem hiding this comment.
This is because dragging with drag_from_anywhere=False creates a new rectangle, which has a center (30, 20). I'll add some more comments to the test to make it clearer what's going on.
dstansby
force-pushed
the
selector-dragging
branch
from
April 16, 2021 12:44
0c35d09 to
17c6f8c
Compare
Member
Author
QuLogic
approved these changes
Apr 16, 2021
7 tasks
6 tasks
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.

PR Summary
As it says in the what's new entry:
The
~matplotlib.widgets.RectangleSelectorand~matplotlib.widgets.EllipseSelectorhave a new keyword argument,select_whole_region, which when set toTrueallows you to click and drag from anywhere inside the selector to move it. Previously it was only possible to move it by either activating the move modifier button, or clicking on the central handle.Questions:
select_whole_regionis the best I came up with, but it doesn't feel great.Here's an example:
Screen.Recording.2021-03-06.at.16.53.58.mov
PR Checklist
pytestpasses).flake8on changed files to check).flake8-docstringsand runflake8 --docstring-convention=all).doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).