Merge pull request #2741 from overleaf/hb-apply-please-scroll-pdf

Force pdf viewer to check watches on clickable link

GitOrigin-RevId: 364da514147751c4c1f69491a5070c94bf94aece
This commit is contained in:
Miguel Serrano 2020-04-22 11:57:14 +02:00 committed by Copybot
parent c62dd1cacb
commit 310f7a7c60

View file

@ -323,11 +323,12 @@ define([
this.setPdfPosition = function(page, position) { this.setPdfPosition = function(page, position) {
// console.log 'required pdf Position is', position // console.log 'required pdf Position is', position
return this.computeOffset(page, position).then(function(offset) { return this.computeOffset(page, position).then(function(offset) {
$scope.pleaseScrollTo = offset return $scope.$apply(() => {
return ($scope.position = position) $scope.pleaseScrollTo = offset
$scope.position = position
})
}) })
} }
return this return this
}) })