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
2019-03-13 13:10:32 +01:00
parent 220b2dcfc2
commit 766b199880
2 changed files with 68 additions and 22 deletions

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