PHP Classes

File: vendors/echarts/src/chart/treemap/helper.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/echarts/src/chart/treemap/helper.js   Download  
File: vendors/echarts/src/chart/treemap/helper.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 1,338 bytes
 

Contents

Class file image Download
define(function (require) { var zrUtil = require('zrender/core/util'); var helper = { retrieveTargetInfo: function (payload, seriesModel) { if (payload && ( payload.type === 'treemapZoomToNode' || payload.type === 'treemapRootToNode' ) ) { var root = seriesModel.getData().tree.root; var targetNode = payload.targetNode; if (targetNode && root.contains(targetNode)) { return {node: targetNode}; } var targetNodeId = payload.targetNodeId; if (targetNodeId != null && (targetNode = root.getNodeById(targetNodeId))) { return {node: targetNode}; } } }, // Not includes the given node at the last item. getPathToRoot: function (node) { var path = []; while (node) { node = node.parentNode; node && path.push(node); } return path.reverse(); }, aboveViewRoot: function (viewRoot, node) { var viewPath = helper.getPathToRoot(viewRoot); return zrUtil.indexOf(viewPath, node) >= 0; } }; return helper; });