2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

Comment out a Debug() for page jumping.

All those functions get called even if Debug() itself is a do-nothing,
so this type of Debug()s should only be uncommented when needed.
This commit is contained in:
Tigran Aivazian 2012-10-08 11:13:59 +01:00
parent a63140e9c8
commit e06069c147

View File

@ -2354,7 +2354,7 @@ function UniReader:addAllCommands()
self.commands:addGroup("[1, 2 .. 9, 0]",numeric_keydefs,
"jump to 0%, 10% .. 90%, 100% of document",
function(unireader,keydef)
Debug('jump to page:', math.max(math.floor(unireader.doc:getPages()*(keydef.keycode-KEY_1)/9),1), '/', unireader.doc:getPages())
--Debug('jump to page:', math.max(math.floor(unireader.doc:getPages()*(keydef.keycode-KEY_1)/9),1), '/', unireader.doc:getPages())
unireader:goto(math.max(math.floor(unireader.doc:getPages()*(keydef.keycode-KEY_1)/9),1))
end)
-- end numeric keys