qauMaWeb/node_modules/.cache/babel-loader/fc29e733b319e6dea958e97890a...

1 line
37 KiB
JSON

{"ast":null,"code":"import \"core-js/modules/es.array.fill.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport * as textContain from 'zrender/lib/contain/text.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enterEmphasis, leaveEmphasis } from '../../util/states.js';\nimport Model from '../../model/Model.js';\nimport DataDiffer from '../../data/DataDiffer.js';\nimport * as listComponentHelper from '../helper/listComponent.js';\nimport ComponentView from '../../view/Component.js';\nimport { ToolboxFeature, getFeature } from './featureManager.js';\nimport { getUID } from '../../util/component.js';\nimport ZRText from 'zrender/lib/graphic/Text.js';\n\nvar ToolboxView =\n/** @class */\nfunction (_super) {\n __extends(ToolboxView, _super);\n\n function ToolboxView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n\n ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n\n if (!toolboxModel.get('show')) {\n return;\n }\n\n var itemSize = +toolboxModel.get('itemSize');\n var isVertical = toolboxModel.get('orient') === 'vertical';\n var featureOpts = toolboxModel.get('feature') || {};\n var features = this._features || (this._features = {});\n var featureNames = [];\n zrUtil.each(featureOpts, function (opt, name) {\n featureNames.push(name);\n });\n new DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(zrUtil.curry(processFeature, null)).execute(); // Keep for diff.\n\n this._featureNames = featureNames;\n\n function processFeature(newIndex, oldIndex) {\n var featureName = featureNames[newIndex];\n var oldName = featureNames[oldIndex];\n var featureOpt = featureOpts[featureName];\n var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);\n var feature; // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\n }\n\n if (featureName && !oldName) {\n // Create\n if (isUserFeatureName(featureName)) {\n feature = {\n onclick: featureModel.option.onclick,\n featureName: featureName\n };\n } else {\n var Feature = getFeature(featureName);\n\n if (!Feature) {\n return;\n }\n\n feature = new Feature();\n }\n\n features[featureName] = feature;\n } else {\n feature = features[oldName]; // If feature does not exsit.\n\n if (!feature) {\n return;\n }\n }\n\n feature.uid = getUID('toolbox-feature');\n feature.model = featureModel;\n feature.ecModel = ecModel;\n feature.api = api;\n var isToolboxFeature = feature instanceof ToolboxFeature;\n\n if (!featureName && oldName) {\n isToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n return;\n }\n\n if (!featureModel.get('show') || isToolboxFeature && feature.unusable) {\n isToolboxFeature && feature.remove && feature.remove(ecModel, api);\n return;\n }\n\n createIconPaths(featureModel, feature, featureName);\n\n featureModel.setIconStatus = function (iconName, status) {\n var option = this.option;\n var iconPaths = this.iconPaths;\n option.iconStatus = option.iconStatus || {};\n option.iconStatus[iconName] = status;\n\n if (iconPaths[iconName]) {\n (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]);\n }\n };\n\n if (feature instanceof ToolboxFeature) {\n if (feature.render) {\n feature.render(featureModel, ecModel, api, payload);\n }\n }\n }\n\n function createIconPaths(featureModel, feature, featureName) {\n var iconStyleModel = featureModel.getModel('iconStyle');\n var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']); // If one feature has mutiple icon. they are orginaized as\n // {\n // icon: {\n // foo: '',\n // bar: ''\n // },\n // title: {\n // foo: '',\n // bar: ''\n // }\n // }\n\n var icons = feature instanceof ToolboxFeature && feature.getIcons ? feature.getIcons() : featureModel.get('icon');\n var titles = featureModel.get('title') || {};\n var iconsMap;\n var titlesMap;\n\n if (zrUtil.isString(icons)) {\n iconsMap = {};\n iconsMap[featureName] = icons;\n } else {\n iconsMap = icons;\n }\n\n if (zrUtil.isString(titles)) {\n titlesMap = {};\n titlesMap[featureName] = titles;\n } else {\n titlesMap = titles;\n }\n\n var iconPaths = featureModel.iconPaths = {};\n zrUtil.each(iconsMap, function (iconStr, iconName) {\n var path = graphic.createIcon(iconStr, {}, {\n x: -itemSize / 2,\n y: -itemSize / 2,\n width: itemSize,\n height: itemSize\n }); // TODO handling image\n\n path.setStyle(iconStyleModel.getItemStyle());\n var pathEmphasisState = path.ensureState('emphasis');\n pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle(); // Text position calculation\n\n var textContent = new ZRText({\n style: {\n text: titlesMap[iconName],\n align: iconStyleEmphasisModel.get('textAlign'),\n borderRadius: iconStyleEmphasisModel.get('textBorderRadius'),\n padding: iconStyleEmphasisModel.get('textPadding'),\n fill: null\n },\n ignore: true\n });\n path.setTextContent(textContent);\n graphic.setTooltipConfig({\n el: path,\n componentModel: toolboxModel,\n itemName: iconName,\n formatterParamsExtra: {\n title: titlesMap[iconName]\n }\n });\n path.__title = titlesMap[iconName];\n path.on('mouseover', function () {\n // Should not reuse above hoverStyle, which might be modified.\n var hoverStyle = iconStyleEmphasisModel.getItemStyle();\n var defaultTextPosition = isVertical ? toolboxModel.get('right') == null && toolboxModel.get('left') !== 'right' ? 'right' : 'left' : toolboxModel.get('bottom') == null && toolboxModel.get('top') !== 'bottom' ? 'bottom' : 'top';\n textContent.setStyle({\n fill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000',\n backgroundColor: iconStyleEmphasisModel.get('textBackgroundColor')\n });\n path.setTextConfig({\n position: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition\n });\n textContent.ignore = !toolboxModel.get('showTitle'); // Use enterEmphasis and leaveEmphasis provide by ec.\n // There are flags managed by the echarts.\n\n api.enterEmphasis(this);\n }).on('mouseout', function () {\n if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') {\n api.leaveEmphasis(this);\n }\n\n textContent.hide();\n });\n (featureModel.get(['iconStatus', iconName]) === 'emphasis' ? enterEmphasis : leaveEmphasis)(path);\n group.add(path);\n path.on('click', zrUtil.bind(feature.onclick, feature, ecModel, api, iconName));\n iconPaths[iconName] = path;\n });\n }\n\n listComponentHelper.layout(group, toolboxModel, api); // Render background after group is layout\n // FIXME\n\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel)); // Adjust icon title positions to avoid them out of screen\n\n isVertical || group.eachChild(function (icon) {\n var titleText = icon.__title; // const hoverStyle = icon.hoverStyle;\n // TODO simplify code?\n\n var emphasisState = icon.ensureState('emphasis');\n var emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {});\n var textContent = icon.getTextContent();\n var emphasisTextState = textContent && textContent.ensureState('emphasis'); // May be background element\n\n if (emphasisTextState && !zrUtil.isFunction(emphasisTextState) && titleText) {\n var emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {});\n var rect = textContain.getBoundingRect(titleText, ZRText.makeFont(emphasisTextStyle));\n var offsetX = icon.x + group.x;\n var offsetY = icon.y + group.y + itemSize;\n var needPutOnTop = false;\n\n if (offsetY + rect.height > api.getHeight()) {\n emphasisTextConfig.position = 'top';\n needPutOnTop = true;\n }\n\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10;\n\n if (offsetX + rect.width / 2 > api.getWidth()) {\n emphasisTextConfig.position = ['100%', topOffset];\n emphasisTextStyle.align = 'right';\n } else if (offsetX - rect.width / 2 < 0) {\n emphasisTextConfig.position = [0, topOffset];\n emphasisTextStyle.align = 'left';\n }\n }\n });\n };\n\n ToolboxView.prototype.updateView = function (toolboxModel, ecModel, api, payload) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.updateView && feature.updateView(feature.model, ecModel, api, payload);\n });\n }; // updateLayout(toolboxModel, ecModel, api, payload) {\n // zrUtil.each(this._features, function (feature) {\n // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload);\n // });\n // },\n\n\n ToolboxView.prototype.remove = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.remove && feature.remove(ecModel, api);\n });\n this.group.removeAll();\n };\n\n ToolboxView.prototype.dispose = function (ecModel, api) {\n zrUtil.each(this._features, function (feature) {\n feature instanceof ToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n });\n };\n\n ToolboxView.type = 'toolbox';\n return ToolboxView;\n}(ComponentView);\n\nfunction isUserFeatureName(featureName) {\n return featureName.indexOf('my') === 0;\n}\n\nexport default ToolboxView;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/toolbox/ToolboxView.js"],"names":["__extends","zrUtil","textContain","graphic","enterEmphasis","leaveEmphasis","Model","DataDiffer","listComponentHelper","ComponentView","ToolboxFeature","getFeature","getUID","ZRText","ToolboxView","_super","apply","arguments","prototype","render","toolboxModel","ecModel","api","payload","group","removeAll","get","itemSize","isVertical","featureOpts","features","_features","featureNames","each","opt","name","push","_featureNames","add","processFeature","update","remove","curry","execute","newIndex","oldIndex","featureName","oldName","featureOpt","featureModel","feature","newTitle","title","isUserFeatureName","onclick","option","Feature","uid","model","isToolboxFeature","dispose","unusable","createIconPaths","setIconStatus","iconName","status","iconPaths","iconStatus","iconStyleModel","getModel","iconStyleEmphasisModel","icons","getIcons","titles","iconsMap","titlesMap","isString","iconStr","path","createIcon","x","y","width","height","setStyle","getItemStyle","pathEmphasisState","ensureState","style","textContent","text","align","borderRadius","padding","fill","ignore","setTextContent","setTooltipConfig","el","componentModel","itemName","formatterParamsExtra","__title","on","hoverStyle","defaultTextPosition","stroke","backgroundColor","setTextConfig","position","hide","bind","layout","makeBackground","getBoundingRect","eachChild","icon","titleText","emphasisState","emphasisTextConfig","textConfig","getTextContent","emphasisTextState","isFunction","emphasisTextStyle","rect","makeFont","offsetX","offsetY","needPutOnTop","getHeight","topOffset","getWidth","updateView","type","indexOf"],"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,SAASA,SAAT,QAA0B,OAA1B;AACA,OAAO,KAAKC,MAAZ,MAAwB,0BAAxB;AACA,OAAO,KAAKC,WAAZ,MAA6B,6BAA7B;AACA,OAAO,KAAKC,OAAZ,MAAyB,uBAAzB;AACA,SAASC,aAAT,EAAwBC,aAAxB,QAA6C,sBAA7C;AACA,OAAOC,KAAP,MAAkB,sBAAlB;AACA,OAAOC,UAAP,MAAuB,0BAAvB;AACA,OAAO,KAAKC,mBAAZ,MAAqC,4BAArC;AACA,OAAOC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B,OAAV,EAAmB;AAC7CA,MAAAA,OAAO,YAAYxC,cAAnB,IAAqCwC,OAAO,CAACU,OAA7C,IAAwDV,OAAO,CAACU,OAAR,CAAgBvC,OAAhB,EAAyBC,GAAzB,CAAxD;AACD,KAFD;AAGD,GAJD;;AAMAR,EAAAA,WAAW,CAACwH,IAAZ,GAAmB,SAAnB;AACA,SAAOxH,WAAP;AACD,CApQD,CAoQEL,aApQF,CAFA;;AAwQA,SAAS4C,iBAAT,CAA2BP,WAA3B,EAAwC;AACtC,SAAOA,WAAW,CAACyF,OAAZ,CAAoB,IAApB,MAA8B,CAArC;AACD;;AAED,eAAezH,WAAf","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\nimport { __extends } from \"tslib\";\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nimport * as textContain from 'zrender/lib/contain/text.js';\r\nimport * as graphic from '../../util/graphic.js';\r\nimport { enterEmphasis, leaveEmphasis } from '../../util/states.js';\r\nimport Model from '../../model/Model.js';\r\nimport DataDiffer from '../../data/DataDiffer.js';\r\nimport * as listComponentHelper from '../helper/listComponent.js';\r\nimport ComponentView from '../../view/Component.js';\r\nimport { ToolboxFeature, getFeature } from './featureManager.js';\r\nimport { getUID } from '../../util/component.js';\r\nimport ZRText from 'zrender/lib/graphic/Text.js';\r\n\r\nvar ToolboxView =\r\n/** @class */\r\nfunction (_super) {\r\n __extends(ToolboxView, _super);\r\n\r\n function ToolboxView() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n\r\n ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) {\r\n var group = this.group;\r\n group.removeAll();\r\n\r\n if (!toolboxModel.get('show')) {\r\n return;\r\n }\r\n\r\n var itemSize = +toolboxModel.get('itemSize');\r\n var isVertical = toolboxModel.get('orient') === 'vertical';\r\n var featureOpts = toolboxModel.get('feature') || {};\r\n var features = this._features || (this._features = {});\r\n var featureNames = [];\r\n zrUtil.each(featureOpts, function (opt, name) {\r\n featureNames.push(name);\r\n });\r\n new DataDiffer(this._featureNames || [], featureNames).add(processFeature).update(processFeature).remove(zrUtil.curry(processFeature, null)).execute(); // Keep for diff.\r\n\r\n this._featureNames = featureNames;\r\n\r\n function processFeature(newIndex, oldIndex) {\r\n var featureName = featureNames[newIndex];\r\n var oldName = featureNames[oldIndex];\r\n var featureOpt = featureOpts[featureName];\r\n var featureModel = new Model(featureOpt, toolboxModel, toolboxModel.ecModel);\r\n var feature; // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\r\n\r\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\r\n featureOpt.title = payload.newTitle;\r\n }\r\n\r\n if (featureName && !oldName) {\r\n // Create\r\n if (isUserFeatureName(featureName)) {\r\n feature = {\r\n onclick: featureModel.option.onclick,\r\n featureName: featureName\r\n };\r\n } else {\r\n var Feature = getFeature(featureName);\r\n\r\n if (!Feature) {\r\n return;\r\n }\r\n\r\n feature = new Feature();\r\n }\r\n\r\n features[featureName] = feature;\r\n } else {\r\n feature = features[oldName]; // If feature does not exsit.\r\n\r\n if (!feature) {\r\n return;\r\n }\r\n }\r\n\r\n feature.uid = getUID('toolbox-feature');\r\n feature.model = featureModel;\r\n feature.ecModel = ecModel;\r\n feature.api = api;\r\n var isToolboxFeature = feature instanceof ToolboxFeature;\r\n\r\n if (!featureName && oldName) {\r\n isToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\r\n return;\r\n }\r\n\r\n if (!featureModel.get('show') || isToolboxFeature && feature.unusable) {\r\n isToolboxFeature && feature.remove && feature.remove(ecModel, api);\r\n return;\r\n }\r\n\r\n createIconPaths(featureModel, feature, featureName);\r\n\r\n featureModel.setIconStatus = function (iconName, status) {\r\n var option = this.option;\r\n var iconPaths = this.iconPaths;\r\n option.iconStatus = option.iconStatus || {};\r\n option.iconStatus[iconName] = status;\r\n\r\n if (iconPaths[iconName]) {\r\n (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]);\r\n }\r\n };\r\n\r\n if (feature instanceof ToolboxFeature) {\r\n if (feature.render) {\r\n feature.render(featureModel, ecModel, api, payload);\r\n }\r\n }\r\n }\r\n\r\n function createIconPaths(featureModel, feature, featureName) {\r\n var iconStyleModel = featureModel.getModel('iconStyle');\r\n var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']); // If one feature has mutiple icon. they are orginaized as\r\n // {\r\n // icon: {\r\n // foo: '',\r\n // bar: ''\r\n // },\r\n // title: {\r\n // foo: '',\r\n // bar: ''\r\n // }\r\n // }\r\n\r\n var icons = feature instanceof ToolboxFeature && feature.getIcons ? feature.getIcons() : featureModel.get('icon');\r\n var titles = featureModel.get('title') || {};\r\n var iconsMap;\r\n var titlesMap;\r\n\r\n if (zrUtil.isString(icons)) {\r\n iconsMap = {};\r\n iconsMap[featureName] = icons;\r\n } else {\r\n iconsMap = icons;\r\n }\r\n\r\n if (zrUtil.isString(titles)) {\r\n titlesMap = {};\r\n titlesMap[featureName] = titles;\r\n } else {\r\n titlesMap = titles;\r\n }\r\n\r\n var iconPaths = featureModel.iconPaths = {};\r\n zrUtil.each(iconsMap, function (iconStr, iconName) {\r\n var path = graphic.createIcon(iconStr, {}, {\r\n x: -itemSize / 2,\r\n y: -itemSize / 2,\r\n width: itemSize,\r\n height: itemSize\r\n }); // TODO handling image\r\n\r\n path.setStyle(iconStyleModel.getItemStyle());\r\n var pathEmphasisState = path.ensureState('emphasis');\r\n pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle(); // Text position calculation\r\n\r\n var textContent = new ZRText({\r\n style: {\r\n text: titlesMap[iconName],\r\n align: iconStyleEmphasisModel.get('textAlign'),\r\n borderRadius: iconStyleEmphasisModel.get('textBorderRadius'),\r\n padding: iconStyleEmphasisModel.get('textPadding'),\r\n fill: null\r\n },\r\n ignore: true\r\n });\r\n path.setTextContent(textContent);\r\n graphic.setTooltipConfig({\r\n el: path,\r\n componentModel: toolboxModel,\r\n itemName: iconName,\r\n formatterParamsExtra: {\r\n title: titlesMap[iconName]\r\n }\r\n });\r\n path.__title = titlesMap[iconName];\r\n path.on('mouseover', function () {\r\n // Should not reuse above hoverStyle, which might be modified.\r\n var hoverStyle = iconStyleEmphasisModel.getItemStyle();\r\n var defaultTextPosition = isVertical ? toolboxModel.get('right') == null && toolboxModel.get('left') !== 'right' ? 'right' : 'left' : toolboxModel.get('bottom') == null && toolboxModel.get('top') !== 'bottom' ? 'bottom' : 'top';\r\n textContent.setStyle({\r\n fill: iconStyleEmphasisModel.get('textFill') || hoverStyle.fill || hoverStyle.stroke || '#000',\r\n backgroundColor: iconStyleEmphasisModel.get('textBackgroundColor')\r\n });\r\n path.setTextConfig({\r\n position: iconStyleEmphasisModel.get('textPosition') || defaultTextPosition\r\n });\r\n textContent.ignore = !toolboxModel.get('showTitle'); // Use enterEmphasis and leaveEmphasis provide by ec.\r\n // There are flags managed by the echarts.\r\n\r\n api.enterEmphasis(this);\r\n }).on('mouseout', function () {\r\n if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') {\r\n api.leaveEmphasis(this);\r\n }\r\n\r\n textContent.hide();\r\n });\r\n (featureModel.get(['iconStatus', iconName]) === 'emphasis' ? enterEmphasis : leaveEmphasis)(path);\r\n group.add(path);\r\n path.on('click', zrUtil.bind(feature.onclick, feature, ecModel, api, iconName));\r\n iconPaths[iconName] = path;\r\n });\r\n }\r\n\r\n listComponentHelper.layout(group, toolboxModel, api); // Render background after group is layout\r\n // FIXME\r\n\r\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel)); // Adjust icon title positions to avoid them out of screen\r\n\r\n isVertical || group.eachChild(function (icon) {\r\n var titleText = icon.__title; // const hoverStyle = icon.hoverStyle;\r\n // TODO simplify code?\r\n\r\n var emphasisState = icon.ensureState('emphasis');\r\n var emphasisTextConfig = emphasisState.textConfig || (emphasisState.textConfig = {});\r\n var textContent = icon.getTextContent();\r\n var emphasisTextState = textContent && textContent.ensureState('emphasis'); // May be background element\r\n\r\n if (emphasisTextState && !zrUtil.isFunction(emphasisTextState) && titleText) {\r\n var emphasisTextStyle = emphasisTextState.style || (emphasisTextState.style = {});\r\n var rect = textContain.getBoundingRect(titleText, ZRText.makeFont(emphasisTextStyle));\r\n var offsetX = icon.x + group.x;\r\n var offsetY = icon.y + group.y + itemSize;\r\n var needPutOnTop = false;\r\n\r\n if (offsetY + rect.height > api.getHeight()) {\r\n emphasisTextConfig.position = 'top';\r\n needPutOnTop = true;\r\n }\r\n\r\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10;\r\n\r\n if (offsetX + rect.width / 2 > api.getWidth()) {\r\n emphasisTextConfig.position = ['100%', topOffset];\r\n emphasisTextStyle.align = 'right';\r\n } else if (offsetX - rect.width / 2 < 0) {\r\n emphasisTextConfig.position = [0, topOffset];\r\n emphasisTextStyle.align = 'left';\r\n }\r\n }\r\n });\r\n };\r\n\r\n ToolboxView.prototype.updateView = function (toolboxModel, ecModel, api, payload) {\r\n zrUtil.each(this._features, function (feature) {\r\n feature instanceof ToolboxFeature && feature.updateView && feature.updateView(feature.model, ecModel, api, payload);\r\n });\r\n }; // updateLayout(toolboxModel, ecModel, api, payload) {\r\n // zrUtil.each(this._features, function (feature) {\r\n // feature.updateLayout && feature.updateLayout(feature.model, ecModel, api, payload);\r\n // });\r\n // },\r\n\r\n\r\n ToolboxView.prototype.remove = function (ecModel, api) {\r\n zrUtil.each(this._features, function (feature) {\r\n feature instanceof ToolboxFeature && feature.remove && feature.remove(ecModel, api);\r\n });\r\n this.group.removeAll();\r\n };\r\n\r\n ToolboxView.prototype.dispose = function (ecModel, api) {\r\n zrUtil.each(this._features, function (feature) {\r\n feature instanceof ToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\r\n });\r\n };\r\n\r\n ToolboxView.type = 'toolbox';\r\n return ToolboxView;\r\n}(ComponentView);\r\n\r\nfunction isUserFeatureName(featureName) {\r\n return featureName.indexOf('my') === 0;\r\n}\r\n\r\nexport default ToolboxView;"]},"metadata":{},"sourceType":"module"}