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

Function initPlotMapTree

examples/js/plottingPanel/PlotMapPanel.js:224–283  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

222 }
223
224 function initPlotMapTree() {
225 hideRightMenu();
226
227 function beforeClickTreeNode(treeId, treeNode){
228 var tree = $.fn.zTree.getZTreeObj(treeId);
229 if (treeNode.isParent) {
230 tree.expandNode(treeNode);
231 // if (treeNode.pId===1) {
232 // //me.clickSmlFileName = treeNode.name;
233 // if(clickTreeNode && typeof(clickTreeNode) === "function"){
234 // clickTreeNode(treeNode.name)
235 // }
236 // //me.events.triggerEvent("clickTreeNode");
237 // }
238 return false;
239 }
240 }
241
242 function zTreeOnCheck() {
243 refreshLayers();
244 }
245
246 function zTreeOnRightClick(event, treeId, treeNode) {
247 currentSelectedNode = treeNode;
248 if (treeNode && treeNode.type === "PlottingLayer") {
249 showRightMenu("PlottingLayer", event.clientX, event.clientY);
250 } else if(treeNode && treeNode.type === "ChildPlottingLayer"){
251 showRightMenu("ChildPlottingLayer", event.clientX, event.clientY);
252 }
253 }
254
255 var setting = {
256 check:{
257 enable: true
258 // chkboxType:{"Y":"","N":""}
259 },
260 view: {
261 dblClickExpand: true,
262 showLine: true,
263 selectedMulti: true,
264 showIcon:true
265 },
266 data: {
267 simpleData: {
268 enable:true,
269 idKey: "id",
270 pIdKey: "pId",
271 rootPId: 0
272 }
273 },
274 callback: {
275 beforeClick: beforeClickTreeNode,
276 onCheck:zTreeOnCheck,
277 onRightClick: zTreeOnRightClick
278 }
279 };
280
281 var symbolTreeData = analysisPlotMap();

Callers 2

PlotMapPanel.jsFile · 0.85
featureAddedFunction · 0.85

Calls 4

hideRightMenuFunction · 0.85
analysisPlotMapFunction · 0.85
$Function · 0.50
initMethod · 0.45

Tested by

no test coverage detected