]> _ Git - fluidbook-html5.git/commitdiff
wip #7609 @2
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Jun 2025 16:05:10 +0000 (18:05 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 20 Jun 2025 16:05:10 +0000 (18:05 +0200)
js/libs/fluidbook/fluidbook.articles.js
js/libs/fluidbook/fluidbook.menu.js

index e1483253251ff01fbe7975c639b0bdbd215771bd..19c9847a12e7bf5d794b3dd548f7643b1a4f73ae 100644 (file)
@@ -84,7 +84,7 @@ FluidbookArticles.prototype = {
             footerContents += '</div>';
             attrs += ' data-max-width="' + width + '" ';
             cls = 'pdf';
-            view = '<div class="content"><div class="pdfarticle-holder" style="max-width: ' + width + 'px;max-height: ' + height + 'px;width: ' + width + 'px;height: ' + height + 'px;">' + '<iframe class="pdfarticle view" frameborder="0" scrolling="no" width="' + iwidth + '" height="' + iheight + '" src="pdfjs/web/viewer.html?&file=../../data/links/' + article.content + '#zoom=' + zoom + ',0,0"></iframe>' + '<iframe class="pdfarticle print" frameborder="0" scrolling="no" width="' + iwidth + '" height="' + iheight + '" src="pdfjs/web/viewer.html?&file=../../data/links/' + article.printcontent + '#zoom=' + zoom + ',0,0"></iframe>' + '</div></div>';
+            view = '<div class="content"><div class="pdfarticle-holder" style="max-width: ' + width + 'px;max-height: ' + height + 'px;width: ' + width + 'px;height: ' + height + 'px;">' + '<iframe class="pdfarticle view" frameborder="0" scrolling="no" width="' + iwidth + '" height="' + iheight + '" src="pdfjs/web/viewer.' + this.fluidbook.settings.htmlExtension + '?&file=../../data/links/' + article.content + '#zoom=' + zoom + ',0,0"></iframe>' + '<iframe class="pdfarticle print" frameborder="0" scrolling="no" width="' + iwidth + '" height="' + iheight + '" src="pdfjs/web/viewer.' + this.fluidbook.settings.htmlExtension + '?&file=../../data/links/' + article.printcontent + '#zoom=' + zoom + ',0,0"></iframe>' + '</div></div>';
         } else {
             view = '<div class="content">' + article.contents + '</div>';
         }
@@ -99,9 +99,9 @@ FluidbookArticles.prototype = {
 
             $(this).on('load', function () {
                 var $iframe = this;
-                if (!$this.initIframe($iframe,view)) {
+                if (!$this.initIframe($iframe, view)) {
                     $this.initPDFJSIframeInterval = setInterval(function () {
-                        $this.initIframe($iframe,view);
+                        $this.initIframe($iframe, view);
                     }, 100);
                 }
             });
@@ -122,7 +122,7 @@ FluidbookArticles.prototype = {
 
     },
 
-    initIframe: function (iframe,view) {
+    initIframe: function (iframe, view) {
         var body = $(iframe).contents().find('body');
         if ($(body).length === 0) {
             return false;
index adadf618bce725f09120759b84985591a19e7719..dea04c8419f6924bbdc69f15d9756ff0b87172cc 100644 (file)
@@ -156,7 +156,7 @@ FluidbookMenu.prototype = {
         let $this = this;
         var infos = this.fluidbook.settings.pdfLinks[uid];
         let c = this.getCaption('', 'nocaption', 'nocaption');
-        c += '<div class="content"><div class="pdf-holder"><iframe class="pdf view ' + infos.interface + '" data-width="' + infos.width + '" data-height="' + infos.height + '" data-total-height="' + infos.totalHeight + '" frameborder="0" scrolling="no" src="pdfjs/web/viewer.html?&file=../../data/links/' + infos.file + '#zoom=page-width"></iframe></div></div>';
+        c += '<div class="content"><div class="pdf-holder"><iframe class="pdf view ' + infos.interface + '" data-width="' + infos.width + '" data-height="' + infos.height + '" data-total-height="' + infos.totalHeight + '" frameborder="0" scrolling="no" src="pdfjs/web/viewer.'+this.fluidbook.settings.htmlExtension+'?&file=../../data/links/' + infos.file + '#zoom=page-width"></iframe></div></div>';
         this.viewWrap(c, 'pdf', '', 'pdf');
         if (callback != undefined) {
             callback();