|
|
@ -61,10 +61,12 @@ function ReaderLink:onTap(arg, ges)
|
|
|
|
if self.ui.document.info.has_pages then
|
|
|
|
if self.ui.document.info.has_pages then
|
|
|
|
local pos = self.view:screenToPageTransform(ges.pos)
|
|
|
|
local pos = self.view:screenToPageTransform(ges.pos)
|
|
|
|
if pos then
|
|
|
|
if pos then
|
|
|
|
|
|
|
|
-- link box in native page
|
|
|
|
local link, lbox = self.ui.document:getLinkFromPosition(pos.page, pos)
|
|
|
|
local link, lbox = self.ui.document:getLinkFromPosition(pos.page, pos)
|
|
|
|
if link and lbox then
|
|
|
|
if link and lbox then
|
|
|
|
-- screen box that holds the link
|
|
|
|
-- screen box that holds the link
|
|
|
|
local sbox = self.view:pageToScreenTransform(pos.page, lbox)
|
|
|
|
local sbox = self.view:pageToScreenTransform(pos.page,
|
|
|
|
|
|
|
|
self.ui.document:nativeToPageRectTransform(pos.page, lbox))
|
|
|
|
if sbox then
|
|
|
|
if sbox then
|
|
|
|
UIManager:show(LinkBox:new{
|
|
|
|
UIManager:show(LinkBox:new{
|
|
|
|
box = sbox,
|
|
|
|
box = sbox,
|
|
|
|