Skip to content

Commit 1b2639a

Browse files
committed
Better for loading multiple files after another
1 parent bbf4925 commit 1b2639a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

example/js/directives/angular-pdf.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,16 @@
101101
if (scope.pageToDisplay <= 1) {
102102
return;
103103
}
104-
scope.pageNum = parseInt(scope.pageNum) - 1;
104+
scope.pageToDisplay = parseInt(scope.pageToDisplay) - 1;
105+
scope.pageNum = scope.pageToDisplay;
105106
};
106107

107108
scope.goNext = function() {
108109
if (scope.pageToDisplay >= pdfDoc.numPages) {
109110
return;
110111
}
111-
scope.pageNum = parseInt(scope.pageNum) + 1;
112+
scope.pageToDisplay = parseInt(scope.pageToDisplay) + 1;
113+
scope.pageNum = scope.pageToDisplay;
112114
};
113115

114116
scope.zoomIn = function() {

0 commit comments

Comments
 (0)