We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a8add2 commit f96ef52Copy full SHA for f96ef52
1 file changed
PDFViewerPlugin.js
@@ -218,7 +218,8 @@ function PDFViewerPlugin() {
218
};
219
220
this.isSlideshow = function () {
221
- return false;
+ // A very simple but generally true guess - if the width is greater than the height, treat it as a slideshow
222
+ return pageWidth > pageHeight;
223
224
225
this.onLoad = function () {};
@@ -255,7 +256,7 @@ function PDFViewerPlugin() {
255
256
self.setZoomLevel(zoomLevel);
257
258
- this.fitToContainingElement = function (width, height) {
259
+ this.fitToPage = function (width, height) {
260
var zoomLevel = width / pageWidth;
261
if (height / pageHeight < zoomLevel) {
262
zoomLevel = height / pageHeight;
0 commit comments