-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Rectangle Selector Upgrade #3937
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
Changes from 1 commit
2ed0d49
f8eefe6
7f044cf
f450df6
79294e0
fd264a2
438715f
e560713
5025ba2
b118294
b15cf12
e96fe81
240cfa2
7915db8
f7a9222
7c04e25
cf491db
7ece2fa
59ccd81
a033e8e
2923f97
6549538
491276e
744308c
a7518b3
77dc52b
48ebf30
3ffd7c0
e802991
af6e1b4
f5666a4
545a727
feb58fe
7bd67d2
b60a84d
840a671
2a11f5f
8da7985
cfe4df1
bc225b6
59145af
d491ac9
8e8e473
2ed0419
d5b5d86
87ab199
9eaae32
819804f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- make sure all blitted artists are marked as 'animated' - use `self.update` instead of `canvas.draw_idle` in extent setter
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1418,6 +1418,8 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False, | |
| if rectprops is None: | ||
| rectprops = dict(facecolor='red', alpha=0.5) | ||
|
|
||
| rectprops['animated'] = useblit | ||
|
|
||
| if direction not in ['horizontal', 'vertical']: | ||
| msg = "direction must be in [ 'horizontal' | 'vertical' ]" | ||
| raise ValueError(msg) | ||
|
|
@@ -1726,6 +1728,7 @@ def __init__(self, ax, onselect, drawtype='patch', | |
| if rectprops is None: | ||
| rectprops = dict(facecolor='red', edgecolor='black', | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an API change, but I think it is ok as this is for interactive work not saving.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's the default in |
||
| alpha=0.2, fill=True) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The docstring above needs to be updated |
||
| rectprops['animated'] = useblit | ||
| self.rectprops = rectprops | ||
| self.to_draw = self._shape_klass((0, 0), | ||
| 0, 1, visible=False, **self.rectprops) | ||
|
|
@@ -1734,6 +1737,7 @@ def __init__(self, ax, onselect, drawtype='patch', | |
| if lineprops is None: | ||
| lineprops = dict(color='black', linestyle='-', | ||
| linewidth=2, alpha=0.5) | ||
| lineprops['animated'] = useblit | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. shouldn't this be |
||
| self.lineprops = lineprops | ||
| self.to_draw = Line2D([0, 0, 0, 0, 0], [0, 0, 0, 0, 0], visible=False, | ||
| **self.lineprops) | ||
|
|
@@ -1954,8 +1958,7 @@ def extents(self, extents): | |
| self._edge_handles.set_data(*self.edge_centers) | ||
| self._center_handle.set_data(*self.center) | ||
| self.set_visible(self.visible) | ||
|
|
||
| self.canvas.draw_idle() | ||
| self.update() | ||
|
|
||
| def draw_shape(self, extents): | ||
| x0, x1, y0, y1 = extents | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still needs to be
self._useblit.