Commit e656366f authored by Luke Campagnola's avatar Luke Campagnola
Browse files

fixed panning bug introduced in inp:274

parent 4716a841
...@@ -524,12 +524,13 @@ class ViewBox(GraphicsWidget): ...@@ -524,12 +524,13 @@ class ViewBox(GraphicsWidget):
if t is not None: if t is not None:
t = Point(t) t = Point(t)
self.setRange(vr.translated(t), padding=0) self.setRange(vr.translated(t), padding=0)
elif x is not None: else:
x1, x2 = vr.left()+x, vr.right()+x if x is not None:
self.setXRange(x1, x2, padding=0) x1, x2 = vr.left()+x, vr.right()+x
elif y is not None: self.setXRange(x1, x2, padding=0)
y1, y2 = vr.top()+y, vr.bottom()+y if y is not None:
self.setYRange(y1, y2, padding=0) y1, y2 = vr.top()+y, vr.bottom()+y
self.setYRange(y1, y2, padding=0)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment