eaeb074f78ee41e5c80532718253c96daec12eda3d5d8b47ef9fc789e6058d01.json 37 KB

1
  1. {"ast":null,"code":"import \"core-js/modules/es.array.push.js\";\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*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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';\nimport { getFont } from '../../label/labelStyle.js';\nvar ToolboxView = /** @class */function (_super) {\n __extends(ToolboxView, _super);\n function ToolboxView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n if (!toolboxModel.get('show')) {\n return;\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();\n // Keep for diff.\n this._featureNames = featureNames;\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;\n // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\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 if (!Feature) {\n return;\n }\n feature = new Feature();\n }\n features[featureName] = feature;\n } else {\n feature = features[oldName];\n // If feature does not exist.\n if (!feature) {\n return;\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 if (!featureName && oldName) {\n isToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n return;\n }\n if (!featureModel.get('show') || isToolboxFeature && feature.unusable) {\n isToolboxFeature && feature.remove && feature.remove(ecModel, api);\n return;\n }\n createIconPaths(featureModel, feature, featureName);\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 if (iconPaths[iconName]) {\n (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]);\n }\n };\n if (feature instanceof ToolboxFeature) {\n if (feature.render) {\n feature.render(featureModel, ecModel, api, payload);\n }\n }\n }\n function createIconPaths(featureModel, feature, featureName) {\n var iconStyleModel = featureModel.getModel('iconStyle');\n var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']);\n // If one feature has multiple icons, they are organized as\n // {\n // icon: {\n // foo: '',\n // bar: ''\n // },\n // title: {\n // foo: '',\n // bar: ''\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 if (zrUtil.isString(icons)) {\n iconsMap = {};\n iconsMap[featureName] = icons;\n } else {\n iconsMap = icons;\n }\n if (zrUtil.isString(titles)) {\n titlesMap = {};\n titlesMap[featureName] = titles;\n } else {\n titlesMap = titles;\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 path.setStyle(iconStyleModel.getItemStyle());\n var pathEmphasisState = path.ensureState('emphasis');\n pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle();\n // Text position calculation\n // TODO: extract `textStyle` from `iconStyle` and use `createTextStyle`\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 font: getFont({\n fontStyle: iconStyleEmphasisModel.get('textFontStyle'),\n fontFamily: iconStyleEmphasisModel.get('textFontFamily'),\n fontSize: iconStyleEmphasisModel.get('textFontSize'),\n fontWeight: iconStyleEmphasisModel.get('textFontWeight')\n }, ecModel)\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');\n // Use enterEmphasis and leaveEmphasis provide by ec.\n // There are flags managed by the echarts.\n api.enterEmphasis(this);\n }).on('mouseout', function () {\n if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') {\n api.leaveEmphasis(this);\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 listComponentHelper.layout(group, toolboxModel, api);\n // Render background after group is layout\n // FIXME\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel));\n // Adjust icon title positions to avoid them out of screen\n isVertical || group.eachChild(function (icon) {\n var titleText = icon.__title;\n // const hoverStyle = icon.hoverStyle;\n // TODO simplify code?\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');\n // May be background element\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 if (offsetY + rect.height > api.getHeight()) {\n emphasisTextConfig.position = 'top';\n needPutOnTop = true;\n }\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10;\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 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 };\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 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 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 ToolboxView.type = 'toolbox';\n return ToolboxView;\n}(ComponentView);\nfunction isUserFeatureName(featureName) {\n return featureName.indexOf('my') === 0;\n}\nexport default ToolboxView;","map":{"version":3,"names":["__extends","zrUtil","textContain","graphic","enterEmphasis","leaveEmphasis","Model","DataDiffer","listComponentHelper","ComponentView","ToolboxFeature","getFeature","getUID","ZRText","getFont","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","font","fontStyle","fontFamily","fontSize","fontWeight","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"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/component/toolbox/ToolboxView.js"],"sourcesContent":["\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*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\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';\nimport { getFont } from '../../label/labelStyle.js';\nvar ToolboxView = /** @class */function (_super) {\n __extends(ToolboxView, _super);\n function ToolboxView() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n ToolboxView.prototype.render = function (toolboxModel, ecModel, api, payload) {\n var group = this.group;\n group.removeAll();\n if (!toolboxModel.get('show')) {\n return;\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();\n // Keep for diff.\n this._featureNames = featureNames;\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;\n // FIX#11236, merge feature title from MagicType newOption. TODO: consider seriesIndex ?\n if (payload && payload.newTitle != null && payload.featureName === featureName) {\n featureOpt.title = payload.newTitle;\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 if (!Feature) {\n return;\n }\n feature = new Feature();\n }\n features[featureName] = feature;\n } else {\n feature = features[oldName];\n // If feature does not exist.\n if (!feature) {\n return;\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 if (!featureName && oldName) {\n isToolboxFeature && feature.dispose && feature.dispose(ecModel, api);\n return;\n }\n if (!featureModel.get('show') || isToolboxFeature && feature.unusable) {\n isToolboxFeature && feature.remove && feature.remove(ecModel, api);\n return;\n }\n createIconPaths(featureModel, feature, featureName);\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 if (iconPaths[iconName]) {\n (status === 'emphasis' ? enterEmphasis : leaveEmphasis)(iconPaths[iconName]);\n }\n };\n if (feature instanceof ToolboxFeature) {\n if (feature.render) {\n feature.render(featureModel, ecModel, api, payload);\n }\n }\n }\n function createIconPaths(featureModel, feature, featureName) {\n var iconStyleModel = featureModel.getModel('iconStyle');\n var iconStyleEmphasisModel = featureModel.getModel(['emphasis', 'iconStyle']);\n // If one feature has multiple icons, they are organized as\n // {\n // icon: {\n // foo: '',\n // bar: ''\n // },\n // title: {\n // foo: '',\n // bar: ''\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 if (zrUtil.isString(icons)) {\n iconsMap = {};\n iconsMap[featureName] = icons;\n } else {\n iconsMap = icons;\n }\n if (zrUtil.isString(titles)) {\n titlesMap = {};\n titlesMap[featureName] = titles;\n } else {\n titlesMap = titles;\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 path.setStyle(iconStyleModel.getItemStyle());\n var pathEmphasisState = path.ensureState('emphasis');\n pathEmphasisState.style = iconStyleEmphasisModel.getItemStyle();\n // Text position calculation\n // TODO: extract `textStyle` from `iconStyle` and use `createTextStyle`\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 font: getFont({\n fontStyle: iconStyleEmphasisModel.get('textFontStyle'),\n fontFamily: iconStyleEmphasisModel.get('textFontFamily'),\n fontSize: iconStyleEmphasisModel.get('textFontSize'),\n fontWeight: iconStyleEmphasisModel.get('textFontWeight')\n }, ecModel)\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');\n // Use enterEmphasis and leaveEmphasis provide by ec.\n // There are flags managed by the echarts.\n api.enterEmphasis(this);\n }).on('mouseout', function () {\n if (featureModel.get(['iconStatus', iconName]) !== 'emphasis') {\n api.leaveEmphasis(this);\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 listComponentHelper.layout(group, toolboxModel, api);\n // Render background after group is layout\n // FIXME\n group.add(listComponentHelper.makeBackground(group.getBoundingRect(), toolboxModel));\n // Adjust icon title positions to avoid them out of screen\n isVertical || group.eachChild(function (icon) {\n var titleText = icon.__title;\n // const hoverStyle = icon.hoverStyle;\n // TODO simplify code?\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');\n // May be background element\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 if (offsetY + rect.height > api.getHeight()) {\n emphasisTextConfig.position = 'top';\n needPutOnTop = true;\n }\n var topOffset = needPutOnTop ? -5 - rect.height : itemSize + 10;\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 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 };\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 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 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 ToolboxView.type = 'toolbox';\n return ToolboxView;\n}(ComponentView);\nfunction isUserFeatureName(featureName) {\n return featureName.indexOf('my') === 0;\n}\nexport default ToolboxView;"],"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,SAAS,QAAQ,OAAO;AACjC,OAAO,KAAKC,MAAM,MAAM,0BAA0B;AAClD,OAAO,KAAKC,WAAW,MAAM,6BAA6B;AAC1D,OAAO,KAAKC,OAAO,MAAM,uBAAuB;AAChD,SAASC,aAAa,EAAEC,aAAa,QAAQ,sBAAsB;AACnE,OAAOC,KAAK,MAAM,sBAAsB;AACxC,OAAOC,UAAU,MAAM,0BAA0B;AACjD,OAAO,KAAKC,mBAAmB,MAAM,4BAA4B;AACjE,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAASC,cAAc,EAAEC,UAAU,QAAQ,qBAAqB;AAChE,SAASC,MAAM,QAAQ,yBAAyB;AAChD,OAA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