1. focusOnComponentByKey
聚焦构件。
1.1. 参数说明:
名称 | 说明 | 类型 | 是否必填 | 示例 |
---|---|---|---|---|
key | 构件key | 字符串 string | 是 | 无 |
isHighlight | 是否高亮构件,缺省为否 | 布尔值 boolean | 否 | true |
needZoom | 是否需要缩放,缺省为否 | 布尔值 boolean | 否 | true |
返回值说明 | 类型 | 示例 |
---|---|---|
无返回值 | NULL | NULL |
1.2. 调用方式:
/**
* 聚焦到构件
* @method focusOnComponentByKey
* @param key {string} 构件key
* @param isHighlight {boolean} 表示是否高亮该构件
* @return {void}
*/
viewer2D.focusOnComponentByKey(key, true, false);