mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Render text layer on hovered pages (and adjacent ones).
This commit is contained in:
parent
1b07dda1b9
commit
786659dc1b
1 changed files with 10 additions and 0 deletions
|
@ -405,6 +405,16 @@ define [
|
|||
scope.adjustingScroll = true
|
||||
element.scrollTop(currentScrollTop + delta)
|
||||
|
||||
element.on 'mouseover', '.pdf-page-container', (e) ->
|
||||
pdfPageEl = $(e.currentTarget)
|
||||
|
||||
pdfPageEl.find('.plv-text-layer').addClass('plv-text-layer-visible')
|
||||
pdfPageEl.prev().find('.plv-text-layer').addClass('plv-text-layer-visible')
|
||||
pdfPageEl.next().find('.plv-text-layer').addClass('plv-text-layer-visible')
|
||||
|
||||
element.on 'mouseout', '.pdf-page-container', (e) ->
|
||||
$('.plv-text-layer-visible').removeClass('plv-text-layer-visible')
|
||||
|
||||
element.on 'scroll', () ->
|
||||
#console.log 'scroll event', element.scrollTop(), 'adjusting?', scope.adjustingScroll
|
||||
#scope.scrollPosition = element.scrollTop()
|
||||
|
|
Loading…
Reference in a new issue