Skip to content

Commit 23ed8ff

Browse files
author
Will Silva
committed
fix small error in poly_editor example
* if vertex 0 is grabbed, the last point of the poly should be updated as well
1 parent de8bc33 commit 23ed8ff

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/event_handling/poly_editor.py

+2
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ def motion_notify_callback(self, event):
141141
x, y = event.xdata, event.ydata
142142

143143
self.poly.xy[self._ind] = x, y
144+
if self._ind == 0:
145+
self.poly.xy[-1] = x, y
144146
self.line.set_data(zip(*self.poly.xy))
145147

146148
self.canvas.restore_region(self.background)

0 commit comments

Comments
 (0)