added locals and removed tabs

pull/690/head
WS64 10 years ago
parent 5d308a4fab
commit c441f151a5

@ -246,16 +246,16 @@ function ReaderRolling:onResume()
end end
function ReaderRolling:onDoubleTapForward() function ReaderRolling:onDoubleTapForward()
i = self.ui.toc:_getChapterPagesLeft(self.current_page,-1) local i = self.ui.toc:_getChapterPagesLeft(self.current_page,-1)
if i ~= "" then if i ~= "" then
self:onGotoViewRel(i+1) self:onGotoViewRel(i+1)
end end
return true return true
end end
function ReaderRolling:onDoubleTapBackward() function ReaderRolling:onDoubleTapBackward()
i = self.ui.toc:_getChapterPagesDone(self.current_page) local i = self.ui.toc:_getChapterPagesDone(self.current_page)
if i ~= "" then if i ~= "" then
self:onGotoViewRel(i) self:onGotoViewRel(i)
end end
return true return true
@ -284,8 +284,7 @@ function ReaderRolling:onGotoViewRel(diff)
end end
self:gotoPos(self.current_pos + pan_diff) self:gotoPos(self.current_pos + pan_diff)
elseif self.view.view_mode == "page" then elseif self.view.view_mode == "page" then
local page_count = self.ui.document:getVisiblePageCount() self:gotoPage(self.current_page + diff)
self:gotoPage(self.current_page + diff*page_count)
end end
return true return true
end end

Loading…
Cancel
Save