mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 06:39:02 +02:00
replace per-page pdf highlight $watch with highlight event
This commit is contained in:
@@ -99,7 +99,7 @@ define [
|
||||
highlights: highlightsElement
|
||||
})
|
||||
|
||||
scope.$watch 'highlights', (highlights, oldVal) ->
|
||||
scope.$on 'pdf:highlights', (event, highlights) ->
|
||||
return unless highlights?
|
||||
return unless highlights.length > 0
|
||||
if scope.timeoutHandler
|
||||
|
||||
@@ -452,6 +452,8 @@ define [
|
||||
|
||||
return if !highlights.length
|
||||
|
||||
scope.$broadcast 'pdf:highlights', areas
|
||||
|
||||
first = highlights[0]
|
||||
|
||||
pageNum = scope.pages[first.page].pageNum
|
||||
|
||||
Reference in New Issue
Block a user