Closed thbaymet closed 10 years ago
You want the instance, not the prototype, so you you would want to do something like
Alfresco.util.ComponentManager.findFirst("Alfresco.WebPreview").plugin._scrollToPage(pageNum);
You'll probably want to wrap this with an if
block which checks that the method is there before calling it, as other plugins used for other content types will not define it.
Also I should mention that _scrollToPage()
is a private method, and so it is not guaranteed to be stable for you to use from outside. What exactly are you trying to achieve?
I've annotations on different pages that all of them are loaded while the document is not loaded totally. They are loaded in a sidebar. So I want to mediaviewer scroll to a specific page when I click on the annotation. For each annotation i ve it's page number; Which method of media-viewer will be nice to call it ?
It's not that you can't call that method, you can. Just that it's not intended to be called from outside. It's probably your only option.
Hi,
I want to know how can I call to media viewers functions in my module to scroll the document to a specific page. Ex:
function myOwnEvent(pageNum) { Alfresco.WebPreview.prototype.Plugins.PdfJs.prototype._scrollToPage(pageNum); }
Is that possible ? Thanks,