Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ba685b5

Browse filesBrowse files
committed
Clean up resize block
1 parent 8229572 commit ba685b5
Copy full SHA for ba685b5

File tree

1 file changed

+2
-3
lines changed
Filter options

1 file changed

+2
-3
lines changed

‎lib/matplotlib/widgets.py

Copy file name to clipboardExpand all lines: lib/matplotlib/widgets.py
+2-3Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3064,15 +3064,14 @@ def _onmove(self, event):
30643064
xy = np.array([event.xdata, event.ydata])
30653065
xy_press = np.array([self._eventpress.xdata, self._eventpress.ydata])
30663066

3067-
# The calculations are done for rotation at zero: we apply inverse
3068-
# transformation to events except when we rotate and move
30693067
state = self._state
30703068
rotate = ('rotate' in state and
30713069
self._active_handle in self._corner_order)
30723070
move = self._active_handle == 'C'
30733071
resize = self._active_handle and not move
30743072

3075-
if not move and not rotate:
3073+
if resize:
3074+
# If resizing, use xy/xy_press in a de-rotated frame
30763075
inv_tr = self._get_rotation_transform().inverted()
30773076
xy = inv_tr.transform(xy)
30783077
xy_press = inv_tr.transform(xy_press)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.