fix(readerlink): restore reader view context on go back

This commit is contained in:
Qingping Hou
2016-03-27 15:39:47 -07:00
parent 2d5222ef33
commit 11d5b5c0a1
15 changed files with 280 additions and 133 deletions

View File

@@ -15,7 +15,7 @@ describe("Readerpaging module", function()
it("should emit EndOfBook event at the end", function()
readerui.zooming:setZoomMode("pageheight")
paging:gotoPage(readerui.document:getPageCount())
paging:onGotoPage(readerui.document:getPageCount())
local called = false
readerui.onEndOfBook = function()
called = true
@@ -35,9 +35,9 @@ describe("Readerpaging module", function()
end)
it("should emit EndOfBook event at the end", function()
paging:gotoPage(readerui.document:getPageCount())
paging:onGotoPage(readerui.document:getPageCount())
readerui.zooming:setZoomMode("pageheight")
readerui.view:onToggleScrollMode(true)
readerui.view:onSetScrollMode(true)
local called = false
readerui.onEndOfBook = function()
called = true