1 line
7.4 KiB
JSON
1 line
7.4 KiB
JSON
|
{"ast":null,"code":"/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\nimport * as helper from '../helper/treeHelper.js';\nimport { noop } from 'zrender/lib/core/util.js';\nvar actionTypes = ['treemapZoomToNode', 'treemapRender', 'treemapMove'];\nexport function installTreemapAction(registers) {\n for (var i = 0; i < actionTypes.length; i++) {\n registers.registerAction({\n type: actionTypes[i],\n update: 'updateView'\n }, noop);\n }\n\n registers.registerAction({\n type: 'treemapRootToNode',\n update: 'updateView'\n }, function (payload, ecModel) {\n ecModel.eachComponent({\n mainType: 'series',\n subType: 'treemap',\n query: payload\n }, handleRootToNode);\n\n function handleRootToNode(model, index) {\n var types = ['treemapZoomToNode', 'treemapRootToNode'];\n var targetInfo = helper.retrieveTargetInfo(payload, types, model);\n\n if (targetInfo) {\n var originViewRoot = model.getViewRoot();\n\n if (originViewRoot) {\n payload.direction = helper.aboveViewRoot(originViewRoot, targetInfo.node) ? 'rollUp' : 'drillDown';\n }\n\n model.resetViewRoot(targetInfo.node);\n }\n }\n });\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/ElectronicMallVue/node_modules/echarts/lib/chart/treemap/treemapAction.js"],"names":["helper","noop","actionTypes","installTreemapAction","registers","i","length","registerAction","type","update","payload","ecModel","eachComponent","mainType","subType","query","handleRootToNode","model","index","types","targetInfo","retrieveTargetInfo","originViewRoot","getViewRoot","direction","aboveViewRoot","node","resetViewRoot"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,MAAZ,MAAwB,yBAAxB;AACA,SAASC,IAAT,QAAqB,0BAArB;AACA,IAAIC,WAAW,GAAG,CAAC,mBAAD,EAAsB,eAAtB,EAAuC,aAAvC,CAAlB;AACA,OAAO,SAASC,oBAAT,CAA8BC,SAA9B,EAAyC;AAC9C,OAAK,IAAIC,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGH,WAAW,CAACI,MAAhC,EAAwCD,CAAC,EAAzC,EAA6C;AAC3CD,IAAAA,SAAS,CAACG,cAAV,CAAyB;AACvBC,MAAAA,IAAI,EAAEN,WAAW,CAACG,CAAD,CADM;AAEvBI,MAAAA,MAAM,EAAE;AAFe,KAAzB,EAGGR,IAHH;AAID;;AAEDG,EAAAA,SAAS,CAACG,cAAV,CAAyB;AACvBC,IAAAA,IAAI,EAAE,mBADiB;AAEvBC,IAAAA,MAAM,EAAE;AAFe,GAAzB,EAGG,UAAUC,OAAV,EAAmBC,OAAnB,EAA4B;AAC7BA,I
|