summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2017-09-20 13:03:47 +0200
committerTor Andersson <tor.andersson@artifex.com>2017-09-20 14:07:51 +0200
commit4fc7d4abdada5efc25fe0976dfe6bc8324905140 (patch)
tree60203f163e488d36f5eb8672df8dc762281af24a /source
parentbff6d163a94386eae21540183b130be6c04f08e9 (diff)
downloadmupdf-4fc7d4abdada5efc25fe0976dfe6bc8324905140.tar.xz
gl: Scroll to link coordinates when following links.
Also save link coordinates in outline nodes.
Diffstat (limited to 'source')
-rw-r--r--source/html/epub-doc.c2
-rw-r--r--source/pdf/pdf-outline.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c
index 53976f78..41b21361 100644
--- a/source/html/epub-doc.c
+++ b/source/html/epub-doc.c
@@ -75,7 +75,7 @@ epub_update_outline(fz_context *ctx, fz_document *doc, fz_outline *node)
{
while (node)
{
- node->page = epub_resolve_link(ctx, doc, node->uri, NULL, NULL);
+ node->page = epub_resolve_link(ctx, doc, node->uri, &node->x, &node->y);
epub_update_outline(ctx, doc, node->down);
node = node->next;
}
diff --git a/source/pdf/pdf-outline.c b/source/pdf/pdf-outline.c
index 2d184dd4..cfbd1961 100644
--- a/source/pdf/pdf-outline.c
+++ b/source/pdf/pdf-outline.c
@@ -34,7 +34,7 @@ pdf_load_outline_imp(fz_context *ctx, pdf_document *doc, pdf_obj *dict)
node->uri = NULL;
if (node->uri)
- node->page = pdf_resolve_link(ctx, doc, node->uri, NULL, NULL);
+ node->page = pdf_resolve_link(ctx, doc, node->uri, &node->x, &node->y);
else
node->page = -1;