MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / selectMenu

Function selectMenu

examples/js/sidebar.js:252–263  ·  view source on GitHub ↗
(id, length)

Source from the content-addressed store, hash-verified

250
251//只处理三层节点,后续可优化
252function selectMenu(id, length) {
253 var target = _getTarget(id, length);
254 if (length !== 1) {
255 //控制editor页面左侧导航栏一级菜单高亮
256 _selectTarget(target.parent().parent().parent().parent());
257 //控制示例页面左侧导航栏一级菜单高亮
258 _selectTarget(target.parent().parent());
259 //控制左侧导航栏最低级菜单高亮
260 _selectTarget(target.parent());
261 _selectTarget(target.find("ul"));
262 }
263}
264
265function _getTarget(id, length) {
266 var target;

Callers 3

initSelectFunction · 0.85
bindEventsFunction · 0.85
scrollFunction · 0.85

Calls 3

_getTargetFunction · 0.85
_selectTargetFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected