fixed small bug in panning to the bottom

This commit is contained in:
HW
2012-04-08 21:16:07 +02:00
parent 7886cb5215
commit 4e542f7d4f

View File

@@ -85,7 +85,7 @@ function CREReader:goto(pos, pos_type)
self.doc:gotoXPointer(pos)
pos = self.doc:getCurrentPos()
else -- pos_type is PERCENT * 100
pos = math.min(pos, self.doc:getFullHeight())
pos = math.min(pos, self.doc:getFullHeight()-height)
pos = math.max(pos, 0)
self.doc:gotoPos(pos)
end