| 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 { parse, stringify } from 'zrender/lib/tool/color.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle.js';\nimport { makeBackground } from '../helper/listComponent.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport ComponentView from '../../view/Component.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { getECData } from '../../util/innerStore.js';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\nvar LegendView = /** @class */function (_super) {\n __extends(LegendView, _super);\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\r\n * @protected\r\n */\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\r\n * @protected\r\n */\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\r\n * @override\r\n */\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n if (!legendModel.get('show', true)) {\n return;\n }\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n // selector has been normalized to an array in model\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n // Perform layout.\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw();\n // Render background after group is layout.\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n };\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var name = legendItemModel.get('name');\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group();\n // @ts-ignore\n g.newline = true;\n contentGroup.add(g);\n return;\n }\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n if (legendDrawnMap.get(name)) {\n // Have been drawn\n return;\n }\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var legendIcon = data.getVisual('legendIcon');\n /**\r\n * `data.getVisual('style')` may be the color from the register\r\n * in series. For example, for line series,\r\n */\n var style = data.getVisual('style');\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n if (!provider.containName(name)) {\n return;\n }\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var legendIcon = provider.getItemVisual(idx, 'legendIcon');\n var colorArr = parse(style.fill);\n // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2;\n // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n style = zrUtil.extend(zrUtil.extend({}, style), {\n fill: stringify(colorArr, 'rgba')\n });\n }\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api);\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect',\n legendId: legendModel.id\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var iconRotate = legendItemModel.get('symbolRotate');\n var symbolKeepAspect = legendItemModel.get('symbolKeepAspect');\n var legendIconType = legendItemModel.get('icon');\n legendIcon = legendIconType || legendIcon || 'roundRect';\n var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api);\n var itemGroup = new Group();\n var textStyleModel = legendItemModel.getModel('textStyle');\n if (zrUtil.isFunction(seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: iconRotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n } else {\n // Use default legend icon policy for most series\n var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: rotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n }\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n if (zrUtil.isString(formatter) && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (zrUtil.isFunction(formatter)) {\n content = formatter(name);\n }\n var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: textColor,\n align: textAlign,\n verticalAlign: 'middle'\n }, {\n inheritColor: textColor\n })\n }));\n // Add a invisible rect to increase the area of mouse hover\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n style: {\n // Cannot use 'invisible' because SVG SSR will miss the node\n fill: 'transparent'\n }\n });\n var tooltipModel = legendItemModel.getModel('tooltip');\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup);\n // @ts-ignore\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup();\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n // Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\r\n * @protected\r\n */\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\nfunction getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {\n /**\r\n * Use series style if is inherit;\r\n * elsewise, use legend style\r\n */\n function handleCommonProps(style, visualStyle) {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n if (style.lineWidth === 'auto') {\n style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;\n }\n each(style, function (propVal, propName) {\n style[propName] === 'inherit' && (style[propName] = visualStyle[propName]);\n });\n }\n // itemStyle\n var itemStyleModel = legendItemModel.getModel('itemStyle');\n var itemStyle = itemStyleModel.getItemStyle();\n var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke';\n var decalStyle = itemStyleModel.getShallow('decal');\n itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);\n if (itemStyle.fill === 'inherit') {\n /**\r\n * Series with visualDrawType as 'stroke' should have\r\n * series stroke as legend fill\r\n */\n itemStyle.fill = itemVisualStyle[drawType];\n }\n if (itemStyle.stroke === 'inherit') {\n /**\r\n * icon type with \"emptyXXX\" should use fill color\r\n * in visual style\r\n */\n itemStyle.stroke = itemVisualStyle[iconBrushType];\n }\n if (itemStyle.opacity === 'inherit') {\n /**\r\n * Use lineStyle.opacity if drawType is stroke\r\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n }\n handleCommonProps(itemStyle, itemVisualStyle);\n // lineStyle\n var legendLineModel = legendItemModel.getModel('lineStyle');\n var lineStyle = legendLineModel.getLineStyle();\n handleCommonProps(lineStyle, lineVisualStyle);\n // Fix auto color to real color\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n if (!isSelected) {\n var borderWidth = legendItemModel.get('inactiveBorderWidth');\n /**\r\n * Since stroke is set to be inactiveBorderColor, it may occur that\r\n * there is no border in series but border in legend, so we need to\r\n * use border only when series has border if is set to be auto\r\n */\n var visualHasBorder = itemStyle[iconBrushType];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendItemModel.get('inactiveColor');\n itemStyle.stroke = legendItemModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineModel.get('inactiveColor');\n lineStyle.lineWidth = legendLineModel.get('inactiveWidth');\n }\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.icon || 'roundRect';\n var icon = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n icon.setStyle(opt.itemStyle);\n icon.rotation = (opt.iconRotate || 0) * Math.PI / 180;\n icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symboType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n}\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n });\n // highlight after select\n // TODO highlight immediately may cause animation loss.\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n return emphasisState && emphasisState.hoverLayer;\n}\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nexport default LegendView;","map":{"version":3,"names":["__extends","zrUtil","parse","stringify","graphic","enableHoverEmphasis","setLabelStyle","createTextStyle","makeBackground","layoutUtil","ComponentView","createSymbol","createOrUpdatePatternFromDecal","getECData","curry","each","Group","LegendView","_super","_this","apply","arguments","type","newlineDisabled","prototype","init","group","add","_contentGroup","_selectorGroup","_isFirstRender","getContentGroup","getSelectorGroup","render","legendModel","ecModel","api","isFirstRender","resetInner","get","itemAlign","orient","selector","selectorPosition","renderInner","positionInfo","getBoxLayoutParams","viewportSize","width","getWidth","height","getHeight","padding","maxSize","getLayoutRect","mainRect","layoutInner","layoutRect","defaults","x","y","markRedraw","_backgroundEl","removeAll","remove","contentGroup","legendDrawnMap","createHashMap","selectMode","excludeSeriesId","eachRawSeries","seriesModel","push","id","getData","legendItemModel","dataIndex","name","g","newline","getSeriesByName","data","lineVisualStyle","getVisual","legendIcon","style","itemGroup","_createItem","on","dispatchSelectAction","dispatchHighlightAction","dispatchDownplayAction","ssr","eachChild","child","ecData","seriesIndex","ssrType","set","legendVisualProvider","provider","containName","idx","indexOfName","getItemVisual","colorArr","fill","extend","process","env","NODE_ENV","console","warn","_createSelector","selectorGroup","createSelectorButton","selectorItem","labelText","Text","align","verticalAlign","onclick","dispatchAction","legendId","labelModel","getModel","emphasisLabelModel","normal","emphasis","defaultText","title","itemVisualStyle","drawType","visualDrawType","itemWidth","itemHeight","isSelected","iconRotate","symbolKeepAspect","legendIconType","getLegendStyle","textStyleModel","isFunction","getLegendIcon","icon","itemStyle","lineStyle","rotate","getDefaultLegendIcon","textX","textAlign","formatter","content","isString","replace","textColor","getTextColor","text","inheritColor","hitRect","Rect","shape","getBoundingRect","tooltipModel","setTooltipConfig","el","componentModel","itemName","itemTooltipOption","option","silent","__legendDataIndex","box","contentRect","contentPos","selectorRect","selectorPos","selectorButtonGap","orientIdx","getOrient","index","wh","hw","yx","Math","max","min","iconType","handleCommonProps","visualStyle","lineWidth","propVal","propName","itemStyleModel","getItemStyle","iconBrushType","lastIndexOf","decalStyle","getShallow","decal","stroke","opacity","legendLineModel","getLineStyle","borderWidth","visualHasBorder","opt","symboType","setStyle","rotation","PI","setOrigin","indexOf","seriesName","dataName","isUseHoverLayer","list","getZr","storage","getDisplayList","emphasisState","i","len","length","states","hoverLayer"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/component/legend/LegendView.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 { parse, stringify } from 'zrender/lib/tool/color.js';\nimport * as graphic from '../../util/graphic.js';\nimport { enableHoverEmphasis } from '../../util/states.js';\nimport { setLabelStyle, createTextStyle } from '../../label/labelStyle.js';\nimport { makeBackground } from '../helper/listComponent.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport ComponentView from '../../view/Component.js';\nimport { createSymbol } from '../../util/symbol.js';\nimport { createOrUpdatePatternFromDecal } from '../../util/decal.js';\nimport { getECData } from '../../util/innerStore.js';\nvar curry = zrUtil.curry;\nvar each = zrUtil.each;\nvar Group = graphic.Group;\nvar LegendView = /** @class */function (_super) {\n __extends(LegendView, _super);\n function LegendView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = LegendView.type;\n _this.newlineDisabled = false;\n return _this;\n }\n LegendView.prototype.init = function () {\n this.group.add(this._contentGroup = new Group());\n this.group.add(this._selectorGroup = new Group());\n this._isFirstRender = true;\n };\n /**\r\n * @protected\r\n */\n LegendView.prototype.getContentGroup = function () {\n return this._contentGroup;\n };\n /**\r\n * @protected\r\n */\n LegendView.prototype.getSelectorGroup = function () {\n return this._selectorGroup;\n };\n /**\r\n * @override\r\n */\n LegendView.prototype.render = function (legendModel, ecModel, api) {\n var isFirstRender = this._isFirstRender;\n this._isFirstRender = false;\n this.resetInner();\n if (!legendModel.get('show', true)) {\n return;\n }\n var itemAlign = legendModel.get('align');\n var orient = legendModel.get('orient');\n if (!itemAlign || itemAlign === 'auto') {\n itemAlign = legendModel.get('left') === 'right' && orient === 'vertical' ? 'right' : 'left';\n }\n // selector has been normalized to an array in model\n var selector = legendModel.get('selector', true);\n var selectorPosition = legendModel.get('selectorPosition', true);\n if (selector && (!selectorPosition || selectorPosition === 'auto')) {\n selectorPosition = orient === 'horizontal' ? 'end' : 'start';\n }\n this.renderInner(itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition);\n // Perform layout.\n var positionInfo = legendModel.getBoxLayoutParams();\n var viewportSize = {\n width: api.getWidth(),\n height: api.getHeight()\n };\n var padding = legendModel.get('padding');\n var maxSize = layoutUtil.getLayoutRect(positionInfo, viewportSize, padding);\n var mainRect = this.layoutInner(legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition);\n // Place mainGroup, based on the calculated `mainRect`.\n var layoutRect = layoutUtil.getLayoutRect(zrUtil.defaults({\n width: mainRect.width,\n height: mainRect.height\n }, positionInfo), viewportSize, padding);\n this.group.x = layoutRect.x - mainRect.x;\n this.group.y = layoutRect.y - mainRect.y;\n this.group.markRedraw();\n // Render background after group is layout.\n this.group.add(this._backgroundEl = makeBackground(mainRect, legendModel));\n };\n LegendView.prototype.resetInner = function () {\n this.getContentGroup().removeAll();\n this._backgroundEl && this.group.remove(this._backgroundEl);\n this.getSelectorGroup().removeAll();\n };\n LegendView.prototype.renderInner = function (itemAlign, legendModel, ecModel, api, selector, orient, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var legendDrawnMap = zrUtil.createHashMap();\n var selectMode = legendModel.get('selectedMode');\n var excludeSeriesId = [];\n ecModel.eachRawSeries(function (seriesModel) {\n !seriesModel.get('legendHoverLink') && excludeSeriesId.push(seriesModel.id);\n });\n each(legendModel.getData(), function (legendItemModel, dataIndex) {\n var name = legendItemModel.get('name');\n // Use empty string or \\n as a newline string\n if (!this.newlineDisabled && (name === '' || name === '\\n')) {\n var g = new Group();\n // @ts-ignore\n g.newline = true;\n contentGroup.add(g);\n return;\n }\n // Representitive series.\n var seriesModel = ecModel.getSeriesByName(name)[0];\n if (legendDrawnMap.get(name)) {\n // Have been drawn\n return;\n }\n // Legend to control series.\n if (seriesModel) {\n var data = seriesModel.getData();\n var lineVisualStyle = data.getVisual('legendLineStyle') || {};\n var legendIcon = data.getVisual('legendIcon');\n /**\r\n * `data.getVisual('style')` may be the color from the register\r\n * in series. For example, for line series,\r\n */\n var style = data.getVisual('style');\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, style, legendIcon, selectMode, api);\n itemGroup.on('click', curry(dispatchSelectAction, name, null, api, excludeSeriesId)).on('mouseover', curry(dispatchHighlightAction, seriesModel.name, null, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, seriesModel.name, null, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n } else {\n // Legend to control data. In pie and funnel.\n ecModel.eachRawSeries(function (seriesModel) {\n // In case multiple series has same data name\n if (legendDrawnMap.get(name)) {\n return;\n }\n if (seriesModel.legendVisualProvider) {\n var provider = seriesModel.legendVisualProvider;\n if (!provider.containName(name)) {\n return;\n }\n var idx = provider.indexOfName(name);\n var style = provider.getItemVisual(idx, 'style');\n var legendIcon = provider.getItemVisual(idx, 'legendIcon');\n var colorArr = parse(style.fill);\n // Color may be set to transparent in visualMap when data is out of range.\n // Do not show nothing.\n if (colorArr && colorArr[3] === 0) {\n colorArr[3] = 0.2;\n // TODO color is set to 0, 0, 0, 0. Should show correct RGBA\n style = zrUtil.extend(zrUtil.extend({}, style), {\n fill: stringify(colorArr, 'rgba')\n });\n }\n var itemGroup = this._createItem(seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, {}, style, legendIcon, selectMode, api);\n // FIXME: consider different series has items with the same name.\n itemGroup.on('click', curry(dispatchSelectAction, null, name, api, excludeSeriesId))\n // Should not specify the series name, consider legend controls\n // more than one pie series.\n .on('mouseover', curry(dispatchHighlightAction, null, name, api, excludeSeriesId)).on('mouseout', curry(dispatchDownplayAction, null, name, api, excludeSeriesId));\n if (ecModel.ssr) {\n itemGroup.eachChild(function (child) {\n var ecData = getECData(child);\n ecData.seriesIndex = seriesModel.seriesIndex;\n ecData.dataIndex = dataIndex;\n ecData.ssrType = 'legend';\n });\n }\n legendDrawnMap.set(name, true);\n }\n }, this);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!legendDrawnMap.get(name)) {\n console.warn(name + ' series not exists. Legend data should be same with series name or data name.');\n }\n }\n }, this);\n if (selector) {\n this._createSelector(selector, legendModel, api, orient, selectorPosition);\n }\n };\n LegendView.prototype._createSelector = function (selector, legendModel, api, orient, selectorPosition) {\n var selectorGroup = this.getSelectorGroup();\n each(selector, function createSelectorButton(selectorItem) {\n var type = selectorItem.type;\n var labelText = new graphic.Text({\n style: {\n x: 0,\n y: 0,\n align: 'center',\n verticalAlign: 'middle'\n },\n onclick: function () {\n api.dispatchAction({\n type: type === 'all' ? 'legendAllSelect' : 'legendInverseSelect',\n legendId: legendModel.id\n });\n }\n });\n selectorGroup.add(labelText);\n var labelModel = legendModel.getModel('selectorLabel');\n var emphasisLabelModel = legendModel.getModel(['emphasis', 'selectorLabel']);\n setLabelStyle(labelText, {\n normal: labelModel,\n emphasis: emphasisLabelModel\n }, {\n defaultText: selectorItem.title\n });\n enableHoverEmphasis(labelText);\n });\n };\n LegendView.prototype._createItem = function (seriesModel, name, dataIndex, legendItemModel, legendModel, itemAlign, lineVisualStyle, itemVisualStyle, legendIcon, selectMode, api) {\n var drawType = seriesModel.visualDrawType;\n var itemWidth = legendModel.get('itemWidth');\n var itemHeight = legendModel.get('itemHeight');\n var isSelected = legendModel.isSelected(name);\n var iconRotate = legendItemModel.get('symbolRotate');\n var symbolKeepAspect = legendItemModel.get('symbolKeepAspect');\n var legendIconType = legendItemModel.get('icon');\n legendIcon = legendIconType || legendIcon || 'roundRect';\n var style = getLegendStyle(legendIcon, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api);\n var itemGroup = new Group();\n var textStyleModel = legendItemModel.getModel('textStyle');\n if (zrUtil.isFunction(seriesModel.getLegendIcon) && (!legendIconType || legendIconType === 'inherit')) {\n // Series has specific way to define legend icon\n itemGroup.add(seriesModel.getLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: iconRotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n } else {\n // Use default legend icon policy for most series\n var rotate = legendIconType === 'inherit' && seriesModel.getData().getVisual('symbol') ? iconRotate === 'inherit' ? seriesModel.getData().getVisual('symbolRotate') : iconRotate : 0; // No rotation for no icon\n itemGroup.add(getDefaultLegendIcon({\n itemWidth: itemWidth,\n itemHeight: itemHeight,\n icon: legendIcon,\n iconRotate: rotate,\n itemStyle: style.itemStyle,\n lineStyle: style.lineStyle,\n symbolKeepAspect: symbolKeepAspect\n }));\n }\n var textX = itemAlign === 'left' ? itemWidth + 5 : -5;\n var textAlign = itemAlign;\n var formatter = legendModel.get('formatter');\n var content = name;\n if (zrUtil.isString(formatter) && formatter) {\n content = formatter.replace('{name}', name != null ? name : '');\n } else if (zrUtil.isFunction(formatter)) {\n content = formatter(name);\n }\n var textColor = isSelected ? textStyleModel.getTextColor() : legendItemModel.get('inactiveColor');\n itemGroup.add(new graphic.Text({\n style: createTextStyle(textStyleModel, {\n text: content,\n x: textX,\n y: itemHeight / 2,\n fill: textColor,\n align: textAlign,\n verticalAlign: 'middle'\n }, {\n inheritColor: textColor\n })\n }));\n // Add a invisible rect to increase the area of mouse hover\n var hitRect = new graphic.Rect({\n shape: itemGroup.getBoundingRect(),\n style: {\n // Cannot use 'invisible' because SVG SSR will miss the node\n fill: 'transparent'\n }\n });\n var tooltipModel = legendItemModel.getModel('tooltip');\n if (tooltipModel.get('show')) {\n graphic.setTooltipConfig({\n el: hitRect,\n componentModel: legendModel,\n itemName: name,\n itemTooltipOption: tooltipModel.option\n });\n }\n itemGroup.add(hitRect);\n itemGroup.eachChild(function (child) {\n child.silent = true;\n });\n hitRect.silent = !selectMode;\n this.getContentGroup().add(itemGroup);\n enableHoverEmphasis(itemGroup);\n // @ts-ignore\n itemGroup.__legendDataIndex = dataIndex;\n return itemGroup;\n };\n LegendView.prototype.layoutInner = function (legendModel, itemAlign, maxSize, isFirstRender, selector, selectorPosition) {\n var contentGroup = this.getContentGroup();\n var selectorGroup = this.getSelectorGroup();\n // Place items in contentGroup.\n layoutUtil.box(legendModel.get('orient'), contentGroup, legendModel.get('itemGap'), maxSize.width, maxSize.height);\n var contentRect = contentGroup.getBoundingRect();\n var contentPos = [-contentRect.x, -contentRect.y];\n selectorGroup.markRedraw();\n contentGroup.markRedraw();\n if (selector) {\n // Place buttons in selectorGroup\n layoutUtil.box(\n // Buttons in selectorGroup always layout horizontally\n 'horizontal', selectorGroup, legendModel.get('selectorItemGap', true));\n var selectorRect = selectorGroup.getBoundingRect();\n var selectorPos = [-selectorRect.x, -selectorRect.y];\n var selectorButtonGap = legendModel.get('selectorButtonGap', true);\n var orientIdx = legendModel.getOrient().index;\n var wh = orientIdx === 0 ? 'width' : 'height';\n var hw = orientIdx === 0 ? 'height' : 'width';\n var yx = orientIdx === 0 ? 'y' : 'x';\n if (selectorPosition === 'end') {\n selectorPos[orientIdx] += contentRect[wh] + selectorButtonGap;\n } else {\n contentPos[orientIdx] += selectorRect[wh] + selectorButtonGap;\n }\n // Always align selector to content as 'middle'\n selectorPos[1 - orientIdx] += contentRect[hw] / 2 - selectorRect[hw] / 2;\n selectorGroup.x = selectorPos[0];\n selectorGroup.y = selectorPos[1];\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n var mainRect = {\n x: 0,\n y: 0\n };\n mainRect[wh] = contentRect[wh] + selectorButtonGap + selectorRect[wh];\n mainRect[hw] = Math.max(contentRect[hw], selectorRect[hw]);\n mainRect[yx] = Math.min(0, selectorRect[yx] + selectorPos[1 - orientIdx]);\n return mainRect;\n } else {\n contentGroup.x = contentPos[0];\n contentGroup.y = contentPos[1];\n return this.group.getBoundingRect();\n }\n };\n /**\r\n * @protected\r\n */\n LegendView.prototype.remove = function () {\n this.getContentGroup().removeAll();\n this._isFirstRender = true;\n };\n LegendView.type = 'legend.plain';\n return LegendView;\n}(ComponentView);\nfunction getLegendStyle(iconType, legendItemModel, lineVisualStyle, itemVisualStyle, drawType, isSelected, api) {\n /**\r\n * Use series style if is inherit;\r\n * elsewise, use legend style\r\n */\n function handleCommonProps(style, visualStyle) {\n // If lineStyle.width is 'auto', it is set to be 2 if series has border\n if (style.lineWidth === 'auto') {\n style.lineWidth = visualStyle.lineWidth > 0 ? 2 : 0;\n }\n each(style, function (propVal, propName) {\n style[propName] === 'inherit' && (style[propName] = visualStyle[propName]);\n });\n }\n // itemStyle\n var itemStyleModel = legendItemModel.getModel('itemStyle');\n var itemStyle = itemStyleModel.getItemStyle();\n var iconBrushType = iconType.lastIndexOf('empty', 0) === 0 ? 'fill' : 'stroke';\n var decalStyle = itemStyleModel.getShallow('decal');\n itemStyle.decal = !decalStyle || decalStyle === 'inherit' ? itemVisualStyle.decal : createOrUpdatePatternFromDecal(decalStyle, api);\n if (itemStyle.fill === 'inherit') {\n /**\r\n * Series with visualDrawType as 'stroke' should have\r\n * series stroke as legend fill\r\n */\n itemStyle.fill = itemVisualStyle[drawType];\n }\n if (itemStyle.stroke === 'inherit') {\n /**\r\n * icon type with \"emptyXXX\" should use fill color\r\n * in visual style\r\n */\n itemStyle.stroke = itemVisualStyle[iconBrushType];\n }\n if (itemStyle.opacity === 'inherit') {\n /**\r\n * Use lineStyle.opacity if drawType is stroke\r\n */\n itemStyle.opacity = (drawType === 'fill' ? itemVisualStyle : lineVisualStyle).opacity;\n }\n handleCommonProps(itemStyle, itemVisualStyle);\n // lineStyle\n var legendLineModel = legendItemModel.getModel('lineStyle');\n var lineStyle = legendLineModel.getLineStyle();\n handleCommonProps(lineStyle, lineVisualStyle);\n // Fix auto color to real color\n itemStyle.fill === 'auto' && (itemStyle.fill = itemVisualStyle.fill);\n itemStyle.stroke === 'auto' && (itemStyle.stroke = itemVisualStyle.fill);\n lineStyle.stroke === 'auto' && (lineStyle.stroke = itemVisualStyle.fill);\n if (!isSelected) {\n var borderWidth = legendItemModel.get('inactiveBorderWidth');\n /**\r\n * Since stroke is set to be inactiveBorderColor, it may occur that\r\n * there is no border in series but border in legend, so we need to\r\n * use border only when series has border if is set to be auto\r\n */\n var visualHasBorder = itemStyle[iconBrushType];\n itemStyle.lineWidth = borderWidth === 'auto' ? itemVisualStyle.lineWidth > 0 && visualHasBorder ? 2 : 0 : itemStyle.lineWidth;\n itemStyle.fill = legendItemModel.get('inactiveColor');\n itemStyle.stroke = legendItemModel.get('inactiveBorderColor');\n lineStyle.stroke = legendLineModel.get('inactiveColor');\n lineStyle.lineWidth = legendLineModel.get('inactiveWidth');\n }\n return {\n itemStyle: itemStyle,\n lineStyle: lineStyle\n };\n}\nfunction getDefaultLegendIcon(opt) {\n var symboType = opt.icon || 'roundRect';\n var icon = createSymbol(symboType, 0, 0, opt.itemWidth, opt.itemHeight, opt.itemStyle.fill, opt.symbolKeepAspect);\n icon.setStyle(opt.itemStyle);\n icon.rotation = (opt.iconRotate || 0) * Math.PI / 180;\n icon.setOrigin([opt.itemWidth / 2, opt.itemHeight / 2]);\n if (symboType.indexOf('empty') > -1) {\n icon.style.stroke = icon.style.fill;\n icon.style.fill = '#fff';\n icon.style.lineWidth = 2;\n }\n return icon;\n}\nfunction dispatchSelectAction(seriesName, dataName, api, excludeSeriesId) {\n // downplay before unselect\n dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId);\n api.dispatchAction({\n type: 'legendToggleSelect',\n name: seriesName != null ? seriesName : dataName\n });\n // highlight after select\n // TODO highlight immediately may cause animation loss.\n dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId);\n}\nfunction isUseHoverLayer(api) {\n var list = api.getZr().storage.getDisplayList();\n var emphasisState;\n var i = 0;\n var len = list.length;\n while (i < len && !(emphasisState = list[i].states.emphasis)) {\n i++;\n }\n return emphasisState && emphasisState.hoverLayer;\n}\nfunction dispatchHighlightAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'highlight',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nfunction dispatchDownplayAction(seriesName, dataName, api, excludeSeriesId) {\n // If element hover will move to a hoverLayer.\n if (!isUseHoverLayer(api)) {\n api.dispatchAction({\n type: 'downplay',\n seriesName: seriesName,\n name: dataName,\n excludeSeriesId: excludeSeriesId\n });\n }\n}\nexport default LegendView;"],"mappings":";AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAC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