Skip to content

Commit c7c5ab9

Browse files
author
eluxen
committed
Increase interval
1 parent 4864139 commit c7c5ab9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: src/angular-pdfjs-viewer.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
window.removeEventListener('DOMMouseScroll', handleMouseWheel);
101101
window.removeEventListener('mousewheel', handleMouseWheel);
102102

103-
var pages = document.querySelectorAll('.page');
103+
var pages = document.querySelectorAll('.pdfViewer.page');
104104
angular.forEach(pages, function (page) {
105105
angular.element(page).children().css('pointer-events', 'none');
106106
});
@@ -126,7 +126,7 @@
126126
console.warn("PDFViewerApplication.pdfViewer is not set");
127127
}
128128

129-
var pages = document.querySelectorAll('.page');
129+
var pages = document.querySelectorAll('.pdfViewer.page');
130130
angular.forEach(pages, function (page) {
131131
var element = angular.element(page);
132132
var pageNum = element.attr('data-page-number');
@@ -150,7 +150,7 @@
150150
});
151151

152152
if (shouldDigest) $scope.$apply();
153-
}, 200, 0, false);
153+
}, 1000, 0, false);
154154

155155
$element.on('$destroy', function() {
156156
$interval.cancel(poller);
@@ -172,7 +172,7 @@
172172
});
173173

174174
// watch other attributes
175-
$scope.$watch(function () {
175+
$element.on('$destroy', $scope.$watch(function () {
176176
return $attrs;
177177
}, function () {
178178
if ($attrs.open === 'false') {
@@ -197,7 +197,7 @@
197197
if ($attrs.height) {
198198
document.getElementById('outerContainer').style.height = $attrs.height;
199199
}
200-
});
200+
}));
201201
}
202202
};
203203
}]);

0 commit comments

Comments
 (0)