cloudAndMonkey / flexpaper

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

Undefined error when trying to retrieve an instance #326

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to access api by calling getDocViewer().fitHeight() and you will end up 
with an undefined error

What version of the product are you using? On what operating system?
I'am working with 2.0.3-1.1.8 zine on firefox 16.02 with flash 11.02

Please provide any additional information below.
I have modified the following lines to solve the problem in ff, havent tested it
in another browser.
In flexpaper.js, line 28, (id==="undefined") should be (id===undefined)
In flexpaper.js, line 31, "FlexPaperViewer_Instance"+instance should be
'FlexPaperViewer_InstancedocumentViewer' + instance 

Original issue reported on code.google.com by fr...@jaarsma-deboer.nl on 5 Nov 2012 at 8:25

GoogleCodeExporter commented 9 years ago
From version 2 and onwards, you need to specify which instance you want to get. 
For example:

$FlexPaper('viewer1').fitHeight() 

will fit the height on the document viewer which has id 'viewer1' in your html 
code.

Original comment by erik.eng...@devaldi.com on 7 Nov 2012 at 9:09