getComponent

JavaScript API reference for Flyout 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

flyout

s7sdk.image.FlyoutZoomView

swatches

s7sdk.set.Swatches

When working with SDK APIs it is important to use a correct, fully qualified SDK namespace as described in Viewer SDK.

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 flyoutZoomView = <instance>.getComponent("flyout"); 
} 
})

On this page

Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Summit Banner

A virtual event April 27-28.

Expand your skills and get inspired.

Register for free
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now
Adobe Maker Awards Banner

Time to shine!

Apply now for the 2021 Adobe Experience Maker Awards.

Apply now