fixed panning bug introduced in inp:274
This commit is contained in:
parent
4716a84117
commit
e656366fab
|
@ -524,10 +524,11 @@ 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:
|
||||||
|
if x is not None:
|
||||||
x1, x2 = vr.left()+x, vr.right()+x
|
x1, x2 = vr.left()+x, vr.right()+x
|
||||||
self.setXRange(x1, x2, padding=0)
|
self.setXRange(x1, x2, padding=0)
|
||||||
elif y is not None:
|
if y is not None:
|
||||||
y1, y2 = vr.top()+y, vr.bottom()+y
|
y1, y2 = vr.top()+y, vr.bottom()+y
|
||||||
self.setYRange(y1, y2, padding=0)
|
self.setYRange(y1, y2, padding=0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user