bobhe / flexpaper

Automatically exported from code.google.com/p/flexpaper
0 stars 0 forks source link

Display issue with height=100% in IE and Firefox #281

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use Firefox 10.0
2. Display a page with FlexPaper using an object tag with width="100%" 
height="100%"

We should see FlexPaper, but nothing appears in Firefox.
In IE, the height is very small.

Changing the height with a pixel value make FlexPaper appear (FF) or resizing 
correctly (IE). But as I don't know how to set the width and height attributes 
from the JavaScript, I use the jQuery command 
$("object").attr("height","800px");

Original issue reported on code.google.com by jblu...@gmail.com on 24 May 2012 at 9:31

GoogleCodeExporter commented 9 years ago
Any reason why you are not using our javascripts? Also please post a code 
snippet which reproduces this if you have it

Original comment by erik.eng...@devaldi.com on 31 May 2012 at 7:17

GoogleCodeExporter commented 9 years ago
I do use your JS to generate the OBJECT tag:

var fp = new FlexPaperViewer(
  "sites/all/modules/xxxxxxxxx/FlexPaperViewer",
  "viewerPlaceHolder",
  {
    config : {
      SwfFile : escape(url_swf),
      Scale : 0.6,
      ZoomTransition : "easeOut",
      ZoomTime : 0.5,
      ZoomInterval : 0.2,
      FitPageOnLoad : true,
      FitWidthOnLoad : false,
      FullScreenAsMaxWindow : false,
      ProgressiveLoading : false,
      MinZoomSize : 0.2,
      MaxZoomSize : 5,
      SearchMatchAll : true,
      InitViewMode : "Portrait",
      PrintPaperAsBitmap : false,
      ViewModeToolsVisible : true,
      ZoomToolsVisible : true,
      NavToolsVisible : true,
      CursorToolsVisible : true,
      SearchToolsVisible : false,
      localeChain: "fr_FR"
    }
  }
);

But this code generates an height="100%" attribute. So I add a line to fix 
height in pixels instead of % :

jQuery("object").attr("height","800px");

Original comment by jblu...@gmail.com on 4 Jun 2012 at 8:23

GoogleCodeExporter commented 9 years ago
Please use the following approach instead (checked and works fine). Use the 
following as your 

        <div style="position:absolute;width:100%;height:100%;">
            <a id="viewerPlaceHolder" style="width:100%;height:100%;display:block"></a> 

            <script type="text/javascript"> 
                var fp = new FlexPaperViewer(   
                         'FlexPaperViewer',
                         'viewerPlaceHolder', { config : {
                         SwfFile : escape('Paper.swf'),
...

Original comment by erik.eng...@devaldi.com on 12 Jun 2012 at 10:00