tencrocs / flexpaper

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

System requires ID="documentViewer", causing errors. #410

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.  Create a page with two document viewers.
2.  Give them IDs that are not documentViewer
3.  Try switching to 2 page view.  Other ways, but this one was fastest.

What is the expected output? What do you see instead?

Expected: 2 page view.  Result: Uncaught TypeError: Cannot read property 
'onAddedTextOverlay' of null

What version of the product are you using? On what operating system?

2.2.9 with Annotations Plugin 2.2.9-1.0.91.  Windows 7.

Please provide any additional information below.

The cause of this issue is the requirement for FlexPaper elements to use the ID 
documentViewer.  There are 4 instances in FlexPaperViewer.js which explicitly 
query: jQuery('#documentViewer') or $FlexPaper('documentViewer') instead of 
using the object's initialized ID.

While I can fix flexpaper.js, I can't touch FlexPaperViewer.js.

Original issue reported on code.google.com by kmwil...@gmail.com on 22 Oct 2014 at 4:45

GoogleCodeExporter commented 9 years ago
This may not be the cause of the JS error with 2 page view.  I modified my 
implementation to reconstruct the document view using the ID documentViewer, 
and still received the error.

However, changing to documentViewer allows Highlight and Strikeout to work for 
all my documents now, where it did not if you don't use the ID documentViewer.

Original comment by kmwil...@gmail.com on 22 Oct 2014 at 5:07