mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
InputContainer: Fall cleanup ;).
Get rid of the doc & seqtext fields, as they are not actually used (nor are they particularly useful, the event handler's name should be pretty self-explanatory). Also, tweak the key_events documentation to highlight the quirks of the API, especially as far as array nesting is involved... Random drive-by cleanup of the declarations of key_events & ges_events to re-use the existing instance object (now that we know they're sane ;p) for tables with a single member (less GC pressure).
This commit is contained in:
@@ -17,17 +17,25 @@ function ReaderPanning:init()
|
||||
self.key_events = {
|
||||
-- these will all generate the same event, just with different arguments
|
||||
MoveUp = {
|
||||
{ "Up" }, doc = "move visible area up",
|
||||
event = "Panning", args = {0, -1} },
|
||||
{ "Up" },
|
||||
event = "Panning",
|
||||
args = {0, -1}
|
||||
},
|
||||
MoveDown = {
|
||||
{ "Down" }, doc = "move visible area down",
|
||||
event = "Panning", args = {0, 1} },
|
||||
{ "Down" },
|
||||
event = "Panning",
|
||||
args = {0, 1}
|
||||
},
|
||||
MoveLeft = {
|
||||
{ "Left" }, doc = "move visible area left",
|
||||
event = "Panning", args = {-1, 0} },
|
||||
{ "Left" },
|
||||
event = "Panning",
|
||||
args = {-1, 0}
|
||||
},
|
||||
MoveRight = {
|
||||
{ "Right" }, doc = "move visible area right",
|
||||
event = "Panning", args = {1, 0} },
|
||||
{ "Right" },
|
||||
event = "Panning",
|
||||
args = {1, 0}
|
||||
},
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user