旋转查看器的JavaScript API引用
getComponent(componentId)
返回对查看器所使用的查看器SDK组件的引用。 网页可以使用此方法来扩展或自定义现成查看器的行为。 仅在 initComplete
查看器回调已运行,否则查看器逻辑可能尚未创建组件。
*
componentID*
- {String}
查看器使用的查看器SDK组件的ID。 此查看器支持以下组件ID:
组件ID |
查看器SDK组件类名称 |
---|---|
parameterManager |
s7sdk.ParameterManager |
容器 |
s7sdk.common.container |
mediaSet |
s7sdk.set.MediaSet |
spinView |
s7sdk.set.SpinView |
zoomInButton |
s7sdk.common.ZoomInButton |
zoomOutButton |
s7sdk.common.ZoomOutButton |
zoomResetButton |
s7sdk.common.ZoomResetButton |
fullScreenButton |
s7sdk.common.FullScreenButton |
closeButton |
s7sdk.common.CloseButton |
spinLeftButton |
s7sdk.common.PanLeftButton |
spinRightButton |
s7sdk.common.PanRightButton |
使用SDK API时,务必使用正确且完全限定的SDK命名空间,如 查看器SDK.
有关特定组件的更多信息,请参阅查看器SDK API文档。
{Object}
对查看器SDK组件的引用。 方法会返回 null
如果 componentId
不是受支持的查看器组件,或者如果查看器逻辑尚未创建该组件,则。
<instance>.setHandlers({
"initComplete":function() {
var spinView = <instance>.getComponent("spinView");
}
})