Re: Export to HTML5 plug-in

by Puybaret » Fri Oct 18, 2019 5:35 pm

There's no parameter to tell the size of the opened canvas in the viewHomeInOverlay version. Its size is 90% of the available space.
You could change the source code of viewHomeInOverlay but generate updated .js code might be complicate for you.
Another solution could be to copy paste viewHomeInOverlay in your page, rename it and change the following part of the code:

Code: Select all

  var canvas = document.getElementById("viewerCanvas");
  if (windowWidth < windowHeight * widthByHeightRatio) {
    canvas.width = 0.9 * windowWidth;
    canvas.height = 0.9 * windowWidth / widthByHeightRatio;
  } else {
    canvas.height = 0.9 * windowHeight;
    canvas.width = 0.9 * windowHeight * widthByHeightRatio;
  }
to:

Code: Select all

  var canvas = document.getElementById("viewerCanvas");
  canvas.width = pageWidth;
  canvas.height = pageHeight;
There are probably other parameters to adjust to take into account scroll bars.