a7mdfm / flexpaper

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

Scrolling with multiple viewers on a page #48

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Embed multiple viewers with different PDFs on a single HTML page.
2. Try to scroll through the documents using the mouse wheel. The HTML page
scrolls in addition to the viewers scrolling.

What is the expected output? What do you see instead?
I expect when the mouse is over one of the PDF viewers, the document should
scroll. Instead, both the document and the entire HTML page scroll. I
notice this behavior on Internet Explorer and Chrome. Firefox seems to
handle it properly. This only happens when there are multiple viewers on a
single HTML page. When there's only one, everything works fine.

What version of the product are you using? On what operating system?
Tried version 1.2.2 and 1.2.3. Windows XP Service Pack 3.

Please provide any additional information below.
I assume that the code for handling the mouse wheel events is related to
the problem, so that the events are being handled twice, once by the
viewer, and once by the browser.

Original issue reported on code.google.com by gshs1...@gmail.com on 23 Mar 2010 at 10:25

GoogleCodeExporter commented 8 years ago

Original comment by erik.eng...@gmail.com on 27 Mar 2010 at 8:29

GoogleCodeExporter commented 8 years ago
After a little playing around, I've managed to figure out something that works 
in the
few browsers that I've tested (IE, Firefox, Chrome, all on Windows XP). 

Basically, I made a JavaScript function that takes the id of the HTML content 
(e.g.
"flashContent"), the id of the new Flash object (e.g. "FlexPaperViewer"), and 
the
name of the file to embed (e.g. "Paper.swf"), and calls embedSWF and adds the 
id of
the viewer to an array. Then, I modified the handleWheel function so that it 
doesn't
assume the name FlexPaperViewer, but instead iterates over the array to see if 
any of
the viewers on the page have focus. Now scrolling events are handled properly 
when
the mouse is over any of the viewers on the page. 

Also, just a thought. It would be nice if all of the JavaScript were packaged 
up in
such a way that one could simply put something like the following into an HTML
document to embed a viewer.

<script type="text/javascript" src="someFile.js">
<span id="viewer"></span>
<script type="text/javascript">
var flashvars = ...;
...
flexPaperViewer("viewer", "Paper.swf", flashvars, ...);
</script>

Thanks for everything. FlexPaper is great!

Original comment by gshs1...@gmail.com on 30 Mar 2010 at 11:03

GoogleCodeExporter commented 8 years ago
Will fix this, not the highest of priorities but thanks a lot for the 
suggestions!

Original comment by erik.eng...@gmail.com on 28 Apr 2010 at 9:17

GoogleCodeExporter commented 8 years ago
This should be fixed as we are not relying on the same methods for scrolling 
any longer. Please retest in the latest version and tell us if it doesn't work!

Original comment by erik.eng...@devaldi.com on 8 Dec 2010 at 8:15

GoogleCodeExporter commented 8 years ago
Can you guys please explain how one embeds more than one viewer per page? 
Thanks a lot!

Original comment by mr1...@gmail.com on 31 Jul 2011 at 2:20