diff Applications/StoneWebViewer/WebApplication/print.js @ 1657:66e5fcdf5597

pdf viewer is working
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Nov 2020 11:19:09 +0100
parents 39137da83b0b
children 9ac2a65d4172
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebApplication/print.js	Tue Nov 17 11:18:53 2020 +0100
+++ b/Applications/StoneWebViewer/WebApplication/print.js	Wed Nov 18 11:19:09 2020 +0100
@@ -36,7 +36,7 @@
   // https://webglfundamentals.org/webgl/lessons/webgl-resizing-the-canvas.html
   var realToCSSPixels = window.devicePixelRatio;
 
-  $('#viewport canvas').each(function(key, canvas) {
+  $('.viewport-canvas').each(function(key, canvas) {
     if ($(canvas).is(':visible')) {
       $(canvas).width(Math.floor(realToCSSPixels * $(canvas).get(0).clientWidth));
       $(canvas).height(Math.floor(realToCSSPixels * $(canvas).get(0).clientHeight));
@@ -52,8 +52,8 @@
   body.removeClass('print');
   body.css('width', '100%');
   body.css('height', '100%');
-  $('#viewport canvas').css('width', '100%');
-  $('#viewport canvas').css('height', '100%');
+  $('.viewport-canvas').css('width', '100%');
+  $('.viewport-canvas').css('height', '100%');
   
   stone.FitForPrint();
 }