Show Menu
TOPICS×

getComponent

JavaScript API reference for eCatalog Viewer
getComponent(componentId)
Returns a reference to the Viewer SDK component that is used by the viewer. The web page can use this method to extend or customize the behavior of the out-of-box viewer. Call this method only after the initComplete viewer callback has run, otherwise the component may not be created yet by the viewer logic.

Parameters

* componentID * - {String} an ID of the Viewer SDK component used by the viewer. This viewer supports the following component IDs:
Component ID
Viewer SDK component class name
parameterManager
s7sdk.ParameterManager
container
s7sdk.common.Container
mediaSet
s7sdk.set.MediaSet
pageView
s7sdk.set.PageView
primaryControls
s7sdk.common.ControlBar
secondaryControls
s7sdk.common.ControlBar
gridView
s7sdk.set.ThumbnailGridView
tableOfContents
s7sdk.set.TableOfContents
infoPanelPopup
s7sdk.info.InfoPanelPopup
imageMapEffect
s7sdk.image.ImageMapEffect
leftButton
s7sdk.common.PanLeftButton
rightButton
s7sdk.common.PanRightButton
zoomInButton
s7sdk.common.ZoomInButton
zoomOutButton
s7sdk.common.ZoomOutButton
zoomResetButton
s7sdk.common.ZoomResetButton
secondaryZoomResetButton
s7sdk.common.ZoomResetButton
thumbnailPageButton
s7sdk.common.ThumbnailPageButton
fullScreenButton
s7sdk.common.FullScreenButton
toolBarLeftButton
s7sdk.common.PanLeftButton
toolBarRightButton
s7sdk.common.PanRightButton
firstPageButton
s7sdk.common.PanLeftButton
secondaryFirstPageButton
s7sdk.common.PanLeftButton
lastPageButton
s7sdk.common.PanRightButton
secondaryLastPageButton
s7sdk.common.PanRightButton
closeButton
s7sdk.common.CloseButton
socialShare
s7sdk.share.SocialShare
twitterShare
s7sdk.share.TwitterShare
facebookShare
s7sdk.share.FacebookShare
linkShare
s7sdk.share.LinkShare
emailShare
s7sdk.share.EmailShare
embedShare
s7sdk.share.EmbedShare
print
s7sdk.share.Print
download
s7sdk.common.Download
favoritesEffect
s7sdk.favorites.FavoritesEffect
favoritesView
s7sdk.favorites.FavoritesView
favoritesMenu
s7sdk.favorites.FavoritesMenu
addFavoriteButton
s7sdk.favorites.AddFavoriteButton
removeFavoriteButton
s7sdk.favorites.RemoveFavoriteButton
viewAllFavoriteButton
s7sdk.favorites.ViewAllFavoriteButton
When working with SDK APIs it is important to use correct fully qualified SDK namespace as described in Viewer SDK namespace .
See the Viewer SDK API documentation for more information about a particular component.

Returns

{Object} a reference to Viewer SDK component. The method returns null if the componentId is not a supported viewer component or if the component was not yet created by the viewer logic.

Example

<instance>.setHandlers({ 
 "initComplete":function() { 
  var pageView = <instance>.getComponent("pageView"); 
} 
})