Cleanup link_states and fix a rare highlight bug
This commit is contained in:
1 parent
e9cc47133f
commit
5caba3f95a
2 files changed
+6
-1
No files matched your search
@@ -302,7 +302,7 @@ function ReaderHighlight:lookup(selected_word)
|
||||
local word_box = self.view:pageToScreenTransform(self.hold_pos.page, selected_word.sbox)
|
||||
self.ui:handleEvent(Event:new("LookupWord", self, selected_word.word, word_box))
|
||||
-- or we will do OCR
|
||||
elseif selected_word.sbox then
|
||||
elseif selected_word.sbox and self.hold_pos then
|
||||
local word = self.ui.document:getOCRWord(self.hold_pos.page, selected_word)
|
||||
DEBUG("OCRed word:", word)
|
||||
local word_box = self.view:pageToScreenTransform(self.hold_pos.page, selected_word.sbox)
|
||||
|
||||
@@ -16,6 +16,11 @@ function ReaderLink:init()
|
||||
end
|
||||
end
|
||||
|
||||
function ReaderLink:onReadSettings(config)
|
||||
-- called when loading new document
|
||||
self.link_states = {}
|
||||
end
|
||||
|
||||
function ReaderLink:initGesListener()
|
||||
if Device:isTouchDevice() then
|
||||
self.ges_events = {
|
||||
|
||||
Reference in new issue
Block a user