Normally, when I create a viewer in my own application, I do:
viewer = $("#some-div").pccViewer({ ...options });
Then I can make calls like:
viewer.viewerControl.search("Some search term.");
But in the legacy samples the Viewer isn't set to a global variable. How can I access the viewerControl object?
If you call $("#some-div").pccViewer();
without any arguments, it will access the existing Viewer in the relevant <div>
instead of creating a new one. For example, in the WebForms sample, var viewer = $("#viewer1").pccViewer();
will create a reference to the sample's existing Viewer.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article