cre 2-pages view: allow extending selection across pages

Similar to what's been added for 1 page view, but just turn
one page instead of switching to scroll mode when reaching
top left or bottom right corners.
Also make the selection start xpointer more accurate by
getting them in onHold(), instead of possibly too late in
onHoldPan() where we have already moved.
This commit is contained in:
poire-z committed 2019-03-13 22:18:04 +01:00
1 parent 220b2dcfc2
commit 766b199880
2 files changed
+68 -22

No files matched your search

+5
View File
@@ -280,6 +280,11 @@ function CreDocument:getWordFromPosition(pos)
w = 20, h = 20,
}
end
if text_range then
-- add xpointers if found, might be useful for across pages highlighting
wordbox.pos0 = text_range.pos0
wordbox.pos1 = text_range.pos1
end
return wordbox
end