mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 14:51:56 +00:00
fix off by one error in viewport retrieval
This commit is contained in:
parent
23011cf221
commit
7485b564bc
1 changed files with 2 additions and 1 deletions
|
@ -312,7 +312,8 @@ app.directive 'pdfViewer', ['$q', '$timeout', ($q, $timeout) ->
|
|||
console.log 'page ref is', r[0]
|
||||
scope.document.getPageIndex(r[0]).then (pidx) ->
|
||||
console.log 'page num is', pidx
|
||||
scope.document.getPdfViewport(pidx).then (viewport) ->
|
||||
page = scope.pages[pidx]
|
||||
scope.document.getPdfViewport(page.pageNum).then (viewport) ->
|
||||
console.log 'got viewport', viewport
|
||||
coords = viewport.convertToViewportPoint r[2], r[3]
|
||||
console.log 'viewport position', coords
|
||||
|
|
Loading…
Add table
Reference in a new issue