Render text layer on hovered pages (and adjacent ones).

This commit is contained in:
Paulo Reis 2017-06-13 11:06:21 +01:00 committed by Brian Gough
parent 1b07dda1b9
commit 786659dc1b

View file

@ -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()