| 1 |
- {"ast":null,"code":"/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\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 Displayable from 'zrender/lib/graphic/Displayable.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as graphicUtil from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isEC4CompatibleStyle, convertFromEC4CompatibleStyle } from '../../util/styleCompat.js';\nimport { applyLeaveTransition, applyUpdateTransition, isTransitionAll, updateLeaveTo } from '../../animation/customGraphicTransition.js';\nimport { updateProps } from '../../animation/basicTransition.js';\nimport { applyKeyframeAnimation, stopPreviousKeyframeAnimationAndRestore } from '../../animation/customGraphicKeyframeAnimation.js';\nvar nonShapeGraphicElements = {\n // Reserved but not supported in graphic component.\n path: null,\n compoundPath: null,\n // Supported in graphic component.\n group: graphicUtil.Group,\n image: graphicUtil.Image,\n text: graphicUtil.Text\n};\nexport var inner = modelUtil.makeInner();\n// ------------------------\n// View\n// ------------------------\nvar GraphicComponentView = /** @class */function (_super) {\n __extends(GraphicComponentView, _super);\n function GraphicComponentView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentView.type;\n return _this;\n }\n GraphicComponentView.prototype.init = function () {\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.render = function (graphicModel, ecModel, api) {\n // Having leveraged between use cases and algorithm complexity, a very\n // simple layout mechanism is used:\n // The size(width/height) can be determined by itself or its parent (not\n // implemented yet), but can not by its children. (Top-down travel)\n // The location(x/y) can be determined by the bounding rect of itself\n // (can including its descendants or not) and the size of its parent.\n // (Bottom-up travel)\n // When `chart.clear()` or `chart.setOption({...}, true)` with the same id,\n // view will be reused.\n if (graphicModel !== this._lastGraphicModel) {\n this._clear();\n }\n this._lastGraphicModel = graphicModel;\n this._updateElements(graphicModel);\n this._relocate(graphicModel, api);\n };\n /**\r\n * Update graphic elements.\r\n */\n GraphicComponentView.prototype._updateElements = function (graphicModel) {\n var elOptionsToUpdate = graphicModel.useElOptionsToUpdate();\n if (!elOptionsToUpdate) {\n return;\n }\n var elMap = this._elMap;\n var rootGroup = this.group;\n var globalZ = graphicModel.get('z');\n var globalZLevel = graphicModel.get('zlevel');\n // Top-down tranverse to assign graphic settings to each elements.\n zrUtil.each(elOptionsToUpdate, function (elOption) {\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var elExisting = id != null ? elMap.get(id) : null;\n var parentId = modelUtil.convertOptionIdName(elOption.parentId, null);\n var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup;\n var elType = elOption.type;\n var elOptionStyle = elOption.style;\n if (elType === 'text' && elOptionStyle) {\n // In top/bottom mode, textVerticalAlign should not be used, which cause\n // inaccurately locating.\n if (elOption.hv && elOption.hv[1]) {\n elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = elOptionStyle.verticalAlign = elOptionStyle.align = null;\n }\n }\n var textContentOption = elOption.textContent;\n var textConfig = elOption.textConfig;\n if (elOptionStyle && isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption)) {\n var convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true);\n if (!textConfig && convertResult.textConfig) {\n textConfig = elOption.textConfig = convertResult.textConfig;\n }\n if (!textContentOption && convertResult.textContent) {\n textContentOption = convertResult.textContent;\n }\n }\n // Remove unnecessary props to avoid potential problems.\n var elOptionCleaned = getCleanedElOption(elOption);\n // For simple, do not support parent change, otherwise reorder is needed.\n if (process.env.NODE_ENV !== 'production') {\n elExisting && zrUtil.assert(targetElParent === elExisting.parent, 'Changing parent is not supported.');\n }\n var $action = elOption.$action || 'merge';\n var isMerge = $action === 'merge';\n var isReplace = $action === 'replace';\n if (isMerge) {\n var isInit = !elExisting;\n var el_1 = elExisting;\n if (isInit) {\n el_1 = createEl(id, targetElParent, elOption.type, elMap);\n } else {\n el_1 && (inner(el_1).isNew = false);\n // Stop and restore before update any other attributes.\n stopPreviousKeyframeAnimationAndRestore(el_1);\n }\n if (el_1) {\n applyUpdateTransition(el_1, elOptionCleaned, graphicModel, {\n isInit: isInit\n });\n updateCommonAttrs(el_1, elOption, globalZ, globalZLevel);\n }\n } else if (isReplace) {\n removeEl(elExisting, elOption, elMap, graphicModel);\n var el_2 = createEl(id, targetElParent, elOption.type, elMap);\n if (el_2) {\n applyUpdateTransition(el_2, elOptionCleaned, graphicModel, {\n isInit: true\n });\n updateCommonAttrs(el_2, elOption, globalZ, globalZLevel);\n }\n } else if ($action === 'remove') {\n updateLeaveTo(elExisting, elOption);\n removeEl(elExisting, elOption, elMap, graphicModel);\n }\n var el = elMap.get(id);\n if (el && textContentOption) {\n if (isMerge) {\n var textContentExisting = el.getTextContent();\n textContentExisting ? textContentExisting.attr(textContentOption) : el.setTextContent(new graphicUtil.Text(textContentOption));\n } else if (isReplace) {\n el.setTextContent(new graphicUtil.Text(textContentOption));\n }\n }\n if (el) {\n var clipPathOption = elOption.clipPath;\n if (clipPathOption) {\n var clipPathType = clipPathOption.type;\n var clipPath = void 0;\n var isInit = false;\n if (isMerge) {\n var oldClipPath = el.getClipPath();\n isInit = !oldClipPath || inner(oldClipPath).type !== clipPathType;\n clipPath = isInit ? newEl(clipPathType) : oldClipPath;\n } else if (isReplace) {\n isInit = true;\n clipPath = newEl(clipPathType);\n }\n el.setClipPath(clipPath);\n applyUpdateTransition(clipPath, clipPathOption, graphicModel, {\n isInit: isInit\n });\n applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel);\n }\n var elInner = inner(el);\n el.setTextConfig(textConfig);\n elInner.option = elOption;\n setEventData(el, graphicModel, elOption);\n graphicUtil.setTooltipConfig({\n el: el,\n componentModel: graphicModel,\n itemName: el.name,\n itemTooltipOption: elOption.tooltip\n });\n applyKeyframeAnimation(el, elOption.keyframeAnimation, graphicModel);\n }\n });\n };\n /**\r\n * Locate graphic elements.\r\n */\n GraphicComponentView.prototype._relocate = function (graphicModel, api) {\n var elOptions = graphicModel.option.elements;\n var rootGroup = this.group;\n var elMap = this._elMap;\n var apiWidth = api.getWidth();\n var apiHeight = api.getHeight();\n var xy = ['x', 'y'];\n // Top-down to calculate percentage width/height of group\n for (var i = 0; i < elOptions.length; i++) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el || !el.isGroup) {\n continue;\n }\n var parentEl = el.parent;\n var isParentRoot = parentEl === rootGroup;\n // Like 'position:absolut' in css, default 0.\n var elInner = inner(el);\n var parentElInner = inner(parentEl);\n elInner.width = parsePercent(elInner.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0;\n elInner.height = parsePercent(elInner.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0;\n }\n // Bottom-up tranvese all elements (consider ec resize) to locate elements.\n for (var i = elOptions.length - 1; i >= 0; i--) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el) {\n continue;\n }\n var parentEl = el.parent;\n var parentElInner = inner(parentEl);\n var containerInfo = parentEl === rootGroup ? {\n width: apiWidth,\n height: apiHeight\n } : {\n width: parentElInner.width,\n height: parentElInner.height\n };\n // PENDING\n // Currently, when `bounding: 'all'`, the union bounding rect of the group\n // does not include the rect of [0, 0, group.width, group.height], which\n // is probably weird for users. Should we make a break change for it?\n var layoutPos = {};\n var layouted = layoutUtil.positionElement(el, elOption, containerInfo, null, {\n hv: elOption.hv,\n boundingMode: elOption.bounding\n }, layoutPos);\n if (!inner(el).isNew && layouted) {\n var transition = elOption.transition;\n var animatePos = {};\n for (var k = 0; k < xy.length; k++) {\n var key = xy[k];\n var val = layoutPos[key];\n if (transition && (isTransitionAll(transition) || zrUtil.indexOf(transition, key) >= 0)) {\n animatePos[key] = val;\n } else {\n el[key] = val;\n }\n }\n updateProps(el, animatePos, graphicModel, 0);\n } else {\n el.attr(layoutPos);\n }\n }\n };\n /**\r\n * Clear all elements.\r\n */\n GraphicComponentView.prototype._clear = function () {\n var _this = this;\n var elMap = this._elMap;\n elMap.each(function (el) {\n removeEl(el, inner(el).option, elMap, _this._lastGraphicModel);\n });\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.dispose = function () {\n this._clear();\n };\n GraphicComponentView.type = 'graphic';\n return GraphicComponentView;\n}(ComponentView);\nexport { GraphicComponentView };\nfunction newEl(graphicType) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(graphicType, 'graphic type MUST be set');\n }\n var Clz = zrUtil.hasOwn(nonShapeGraphicElements, graphicType)\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n ? nonShapeGraphicElements[graphicType] : graphicUtil.getShapeClass(graphicType);\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(Clz, \"graphic type \" + graphicType + \" can not be found\");\n }\n var el = new Clz({});\n inner(el).type = graphicType;\n return el;\n}\nfunction createEl(id, targetElParent, graphicType, elMap) {\n var el = newEl(graphicType);\n targetElParent.add(el);\n elMap.set(id, el);\n inner(el).id = id;\n inner(el).isNew = true;\n return el;\n}\nfunction removeEl(elExisting, elOption, elMap, graphicModel) {\n var existElParent = elExisting && elExisting.parent;\n if (existElParent) {\n elExisting.type === 'group' && elExisting.traverse(function (el) {\n removeEl(el, elOption, elMap, graphicModel);\n });\n applyLeaveTransition(elExisting, elOption, graphicModel);\n elMap.removeKey(inner(elExisting).id);\n }\n}\nfunction updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {\n if (!el.isGroup) {\n zrUtil.each([['cursor', Displayable.prototype.cursor],\n // We should not support configure z and zlevel in the element level.\n // But seems we didn't limit it previously. So here still use it to avoid breaking.\n ['zlevel', defaultZlevel || 0], ['z', defaultZ || 0],\n // z2 must not be null/undefined, otherwise sort error may occur.\n ['z2', 0]], function (item) {\n var prop = item[0];\n if (zrUtil.hasOwn(elOption, prop)) {\n el[prop] = zrUtil.retrieve2(elOption[prop], item[1]);\n } else if (el[prop] == null) {\n el[prop] = item[1];\n }\n });\n }\n zrUtil.each(zrUtil.keys(elOption), function (key) {\n // Assign event handlers.\n // PENDING: should enumerate all event names or use pattern matching?\n if (key.indexOf('on') === 0) {\n var val = elOption[key];\n el[key] = zrUtil.isFunction(val) ? val : null;\n }\n });\n if (zrUtil.hasOwn(elOption, 'draggable')) {\n el.draggable = elOption.draggable;\n }\n // Other attributes\n elOption.name != null && (el.name = elOption.name);\n elOption.id != null && (el.id = elOption.id);\n}\n// Remove unnecessary props to avoid potential problems.\nfunction getCleanedElOption(elOption) {\n elOption = zrUtil.extend({}, elOption);\n zrUtil.each(['id', 'parentId', '$action', 'hv', 'bounding', 'textContent', 'clipPath'].concat(layoutUtil.LOCATION_PARAMS), function (name) {\n delete elOption[name];\n });\n return elOption;\n}\nfunction setEventData(el, graphicModel, elOption) {\n var eventData = getECData(el).eventData;\n // Simple optimize for large amount of elements that no need event.\n if (!el.silent && !el.ignore && !eventData) {\n eventData = getECData(el).eventData = {\n componentType: 'graphic',\n componentIndex: graphicModel.componentIndex,\n name: el.name\n };\n }\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n if (eventData) {\n eventData.info = elOption.info;\n }\n}","map":{"version":3,"names":["__extends","zrUtil","Displayable","modelUtil","graphicUtil","layoutUtil","parsePercent","ComponentView","getECData","isEC4CompatibleStyle","convertFromEC4CompatibleStyle","applyLeaveTransition","applyUpdateTransition","isTransitionAll","updateLeaveTo","updateProps","applyKeyframeAnimation","stopPreviousKeyframeAnimationAndRestore","nonShapeGraphicElements","path","compoundPath","group","Group","image","Image","text","Text","inner","makeInner","GraphicComponentView","_super","_this","apply","arguments","type","prototype","init","_elMap","createHashMap","render","graphicModel","ecModel","api","_lastGraphicModel","_clear","_updateElements","_relocate","elOptionsToUpdate","useElOptionsToUpdate","elMap","rootGroup","globalZ","get","globalZLevel","each","elOption","id","convertOptionIdName","elExisting","parentId","targetElParent","elType","elOptionStyle","style","hv","textVerticalAlign","textBaseline","verticalAlign","align","textContentOption","textContent","textConfig","convertResult","elOptionCleaned","getCleanedElOption","process","env","NODE_ENV","assert","parent","$action","isMerge","isReplace","isInit","el_1","createEl","isNew","updateCommonAttrs","removeEl","el_2","el","textContentExisting","getTextContent","attr","setTextContent","clipPathOption","clipPath","clipPathType","oldClipPath","getClipPath","newEl","setClipPath","keyframeAnimation","elInner","setTextConfig","option","setEventData","setTooltipConfig","componentModel","itemName","name","itemTooltipOption","tooltip","elOptions","elements","apiWidth","getWidth","apiHeight","getHeight","xy","i","length","isGroup","parentEl","isParentRoot","parentElInner","width","height","containerInfo","layoutPos","layouted","positionElement","boundingMode","bounding","transition","animatePos","k","key","val","indexOf","dispose","graphicType","Clz","hasOwn","getShapeClass","add","set","existElParent","traverse","removeKey","defaultZ","defaultZlevel","cursor","item","prop","retrieve2","keys","isFunction","draggable","extend","concat","LOCATION_PARAMS","eventData","silent","ignore","componentType","componentIndex","info"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/component/graphic/GraphicView.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 Displayable from 'zrender/lib/graphic/Displayable.js';\nimport * as modelUtil from '../../util/model.js';\nimport * as graphicUtil from '../../util/graphic.js';\nimport * as layoutUtil from '../../util/layout.js';\nimport { parsePercent } from '../../util/number.js';\nimport ComponentView from '../../view/Component.js';\nimport { getECData } from '../../util/innerStore.js';\nimport { isEC4CompatibleStyle, convertFromEC4CompatibleStyle } from '../../util/styleCompat.js';\nimport { applyLeaveTransition, applyUpdateTransition, isTransitionAll, updateLeaveTo } from '../../animation/customGraphicTransition.js';\nimport { updateProps } from '../../animation/basicTransition.js';\nimport { applyKeyframeAnimation, stopPreviousKeyframeAnimationAndRestore } from '../../animation/customGraphicKeyframeAnimation.js';\nvar nonShapeGraphicElements = {\n // Reserved but not supported in graphic component.\n path: null,\n compoundPath: null,\n // Supported in graphic component.\n group: graphicUtil.Group,\n image: graphicUtil.Image,\n text: graphicUtil.Text\n};\nexport var inner = modelUtil.makeInner();\n// ------------------------\n// View\n// ------------------------\nvar GraphicComponentView = /** @class */function (_super) {\n __extends(GraphicComponentView, _super);\n function GraphicComponentView() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.type = GraphicComponentView.type;\n return _this;\n }\n GraphicComponentView.prototype.init = function () {\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.render = function (graphicModel, ecModel, api) {\n // Having leveraged between use cases and algorithm complexity, a very\n // simple layout mechanism is used:\n // The size(width/height) can be determined by itself or its parent (not\n // implemented yet), but can not by its children. (Top-down travel)\n // The location(x/y) can be determined by the bounding rect of itself\n // (can including its descendants or not) and the size of its parent.\n // (Bottom-up travel)\n // When `chart.clear()` or `chart.setOption({...}, true)` with the same id,\n // view will be reused.\n if (graphicModel !== this._lastGraphicModel) {\n this._clear();\n }\n this._lastGraphicModel = graphicModel;\n this._updateElements(graphicModel);\n this._relocate(graphicModel, api);\n };\n /**\r\n * Update graphic elements.\r\n */\n GraphicComponentView.prototype._updateElements = function (graphicModel) {\n var elOptionsToUpdate = graphicModel.useElOptionsToUpdate();\n if (!elOptionsToUpdate) {\n return;\n }\n var elMap = this._elMap;\n var rootGroup = this.group;\n var globalZ = graphicModel.get('z');\n var globalZLevel = graphicModel.get('zlevel');\n // Top-down tranverse to assign graphic settings to each elements.\n zrUtil.each(elOptionsToUpdate, function (elOption) {\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var elExisting = id != null ? elMap.get(id) : null;\n var parentId = modelUtil.convertOptionIdName(elOption.parentId, null);\n var targetElParent = parentId != null ? elMap.get(parentId) : rootGroup;\n var elType = elOption.type;\n var elOptionStyle = elOption.style;\n if (elType === 'text' && elOptionStyle) {\n // In top/bottom mode, textVerticalAlign should not be used, which cause\n // inaccurately locating.\n if (elOption.hv && elOption.hv[1]) {\n elOptionStyle.textVerticalAlign = elOptionStyle.textBaseline = elOptionStyle.verticalAlign = elOptionStyle.align = null;\n }\n }\n var textContentOption = elOption.textContent;\n var textConfig = elOption.textConfig;\n if (elOptionStyle && isEC4CompatibleStyle(elOptionStyle, elType, !!textConfig, !!textContentOption)) {\n var convertResult = convertFromEC4CompatibleStyle(elOptionStyle, elType, true);\n if (!textConfig && convertResult.textConfig) {\n textConfig = elOption.textConfig = convertResult.textConfig;\n }\n if (!textContentOption && convertResult.textContent) {\n textContentOption = convertResult.textContent;\n }\n }\n // Remove unnecessary props to avoid potential problems.\n var elOptionCleaned = getCleanedElOption(elOption);\n // For simple, do not support parent change, otherwise reorder is needed.\n if (process.env.NODE_ENV !== 'production') {\n elExisting && zrUtil.assert(targetElParent === elExisting.parent, 'Changing parent is not supported.');\n }\n var $action = elOption.$action || 'merge';\n var isMerge = $action === 'merge';\n var isReplace = $action === 'replace';\n if (isMerge) {\n var isInit = !elExisting;\n var el_1 = elExisting;\n if (isInit) {\n el_1 = createEl(id, targetElParent, elOption.type, elMap);\n } else {\n el_1 && (inner(el_1).isNew = false);\n // Stop and restore before update any other attributes.\n stopPreviousKeyframeAnimationAndRestore(el_1);\n }\n if (el_1) {\n applyUpdateTransition(el_1, elOptionCleaned, graphicModel, {\n isInit: isInit\n });\n updateCommonAttrs(el_1, elOption, globalZ, globalZLevel);\n }\n } else if (isReplace) {\n removeEl(elExisting, elOption, elMap, graphicModel);\n var el_2 = createEl(id, targetElParent, elOption.type, elMap);\n if (el_2) {\n applyUpdateTransition(el_2, elOptionCleaned, graphicModel, {\n isInit: true\n });\n updateCommonAttrs(el_2, elOption, globalZ, globalZLevel);\n }\n } else if ($action === 'remove') {\n updateLeaveTo(elExisting, elOption);\n removeEl(elExisting, elOption, elMap, graphicModel);\n }\n var el = elMap.get(id);\n if (el && textContentOption) {\n if (isMerge) {\n var textContentExisting = el.getTextContent();\n textContentExisting ? textContentExisting.attr(textContentOption) : el.setTextContent(new graphicUtil.Text(textContentOption));\n } else if (isReplace) {\n el.setTextContent(new graphicUtil.Text(textContentOption));\n }\n }\n if (el) {\n var clipPathOption = elOption.clipPath;\n if (clipPathOption) {\n var clipPathType = clipPathOption.type;\n var clipPath = void 0;\n var isInit = false;\n if (isMerge) {\n var oldClipPath = el.getClipPath();\n isInit = !oldClipPath || inner(oldClipPath).type !== clipPathType;\n clipPath = isInit ? newEl(clipPathType) : oldClipPath;\n } else if (isReplace) {\n isInit = true;\n clipPath = newEl(clipPathType);\n }\n el.setClipPath(clipPath);\n applyUpdateTransition(clipPath, clipPathOption, graphicModel, {\n isInit: isInit\n });\n applyKeyframeAnimation(clipPath, clipPathOption.keyframeAnimation, graphicModel);\n }\n var elInner = inner(el);\n el.setTextConfig(textConfig);\n elInner.option = elOption;\n setEventData(el, graphicModel, elOption);\n graphicUtil.setTooltipConfig({\n el: el,\n componentModel: graphicModel,\n itemName: el.name,\n itemTooltipOption: elOption.tooltip\n });\n applyKeyframeAnimation(el, elOption.keyframeAnimation, graphicModel);\n }\n });\n };\n /**\r\n * Locate graphic elements.\r\n */\n GraphicComponentView.prototype._relocate = function (graphicModel, api) {\n var elOptions = graphicModel.option.elements;\n var rootGroup = this.group;\n var elMap = this._elMap;\n var apiWidth = api.getWidth();\n var apiHeight = api.getHeight();\n var xy = ['x', 'y'];\n // Top-down to calculate percentage width/height of group\n for (var i = 0; i < elOptions.length; i++) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el || !el.isGroup) {\n continue;\n }\n var parentEl = el.parent;\n var isParentRoot = parentEl === rootGroup;\n // Like 'position:absolut' in css, default 0.\n var elInner = inner(el);\n var parentElInner = inner(parentEl);\n elInner.width = parsePercent(elInner.option.width, isParentRoot ? apiWidth : parentElInner.width) || 0;\n elInner.height = parsePercent(elInner.option.height, isParentRoot ? apiHeight : parentElInner.height) || 0;\n }\n // Bottom-up tranvese all elements (consider ec resize) to locate elements.\n for (var i = elOptions.length - 1; i >= 0; i--) {\n var elOption = elOptions[i];\n var id = modelUtil.convertOptionIdName(elOption.id, null);\n var el = id != null ? elMap.get(id) : null;\n if (!el) {\n continue;\n }\n var parentEl = el.parent;\n var parentElInner = inner(parentEl);\n var containerInfo = parentEl === rootGroup ? {\n width: apiWidth,\n height: apiHeight\n } : {\n width: parentElInner.width,\n height: parentElInner.height\n };\n // PENDING\n // Currently, when `bounding: 'all'`, the union bounding rect of the group\n // does not include the rect of [0, 0, group.width, group.height], which\n // is probably weird for users. Should we make a break change for it?\n var layoutPos = {};\n var layouted = layoutUtil.positionElement(el, elOption, containerInfo, null, {\n hv: elOption.hv,\n boundingMode: elOption.bounding\n }, layoutPos);\n if (!inner(el).isNew && layouted) {\n var transition = elOption.transition;\n var animatePos = {};\n for (var k = 0; k < xy.length; k++) {\n var key = xy[k];\n var val = layoutPos[key];\n if (transition && (isTransitionAll(transition) || zrUtil.indexOf(transition, key) >= 0)) {\n animatePos[key] = val;\n } else {\n el[key] = val;\n }\n }\n updateProps(el, animatePos, graphicModel, 0);\n } else {\n el.attr(layoutPos);\n }\n }\n };\n /**\r\n * Clear all elements.\r\n */\n GraphicComponentView.prototype._clear = function () {\n var _this = this;\n var elMap = this._elMap;\n elMap.each(function (el) {\n removeEl(el, inner(el).option, elMap, _this._lastGraphicModel);\n });\n this._elMap = zrUtil.createHashMap();\n };\n GraphicComponentView.prototype.dispose = function () {\n this._clear();\n };\n GraphicComponentView.type = 'graphic';\n return GraphicComponentView;\n}(ComponentView);\nexport { GraphicComponentView };\nfunction newEl(graphicType) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(graphicType, 'graphic type MUST be set');\n }\n var Clz = zrUtil.hasOwn(nonShapeGraphicElements, graphicType)\n // Those graphic elements are not shapes. They should not be\n // overwritten by users, so do them first.\n ? nonShapeGraphicElements[graphicType] : graphicUtil.getShapeClass(graphicType);\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(Clz, \"graphic type \" + graphicType + \" can not be found\");\n }\n var el = new Clz({});\n inner(el).type = graphicType;\n return el;\n}\nfunction createEl(id, targetElParent, graphicType, elMap) {\n var el = newEl(graphicType);\n targetElParent.add(el);\n elMap.set(id, el);\n inner(el).id = id;\n inner(el).isNew = true;\n return el;\n}\nfunction removeEl(elExisting, elOption, elMap, graphicModel) {\n var existElParent = elExisting && elExisting.parent;\n if (existElParent) {\n elExisting.type === 'group' && elExisting.traverse(function (el) {\n removeEl(el, elOption, elMap, graphicModel);\n });\n applyLeaveTransition(elExisting, elOption, graphicModel);\n elMap.removeKey(inner(elExisting).id);\n }\n}\nfunction updateCommonAttrs(el, elOption, defaultZ, defaultZlevel) {\n if (!el.isGroup) {\n zrUtil.each([['cursor', Displayable.prototype.cursor],\n // We should not support configure z and zlevel in the element level.\n // But seems we didn't limit it previously. So here still use it to avoid breaking.\n ['zlevel', defaultZlevel || 0], ['z', defaultZ || 0],\n // z2 must not be null/undefined, otherwise sort error may occur.\n ['z2', 0]], function (item) {\n var prop = item[0];\n if (zrUtil.hasOwn(elOption, prop)) {\n el[prop] = zrUtil.retrieve2(elOption[prop], item[1]);\n } else if (el[prop] == null) {\n el[prop] = item[1];\n }\n });\n }\n zrUtil.each(zrUtil.keys(elOption), function (key) {\n // Assign event handlers.\n // PENDING: should enumerate all event names or use pattern matching?\n if (key.indexOf('on') === 0) {\n var val = elOption[key];\n el[key] = zrUtil.isFunction(val) ? val : null;\n }\n });\n if (zrUtil.hasOwn(elOption, 'draggable')) {\n el.draggable = elOption.draggable;\n }\n // Other attributes\n elOption.name != null && (el.name = elOption.name);\n elOption.id != null && (el.id = elOption.id);\n}\n// Remove unnecessary props to avoid potential problems.\nfunction getCleanedElOption(elOption) {\n elOption = zrUtil.extend({}, elOption);\n zrUtil.each(['id', 'parentId', '$action', 'hv', 'bounding', 'textContent', 'clipPath'].concat(layoutUtil.LOCATION_PARAMS), function (name) {\n delete elOption[name];\n });\n return elOption;\n}\nfunction setEventData(el, graphicModel, elOption) {\n var eventData = getECData(el).eventData;\n // Simple optimize for large amount of elements that no need event.\n if (!el.silent && !el.ignore && !eventData) {\n eventData = getECData(el).eventData = {\n componentType: 'graphic',\n componentIndex: graphicModel.componentIndex,\n name: el.name\n };\n }\n // `elOption.info` enables user to mount some info on\n // elements and use them in event handlers.\n if (eventData) {\n eventData.info = elOption.info;\n }\n}"],"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,OAAOC,WAAW,MAAM,oCAAoC;AAC5D,OAAO,KAAKC,SAAS,MAAM,qBAAqB;AAChD,OAAO,KAAKC,WAAW,MAAM,uBAAuB;AACpD,OAAO,KAAKC,UAAU,MAAM,sBAAsB;AAClD,SAASC,YAAY,QAAQ,sBAAsB;AACnD,OAAOC,aAAa,MAAM,yBAAyB;AACnD,SAASC,SAAS,QAAQ,0BAA0B;AACpD,SAASC,oBAAoB,EAAEC,6BAA6B,QAAQ,2BAA2B;AAC/F,SAASC,oBAAoB,EAAEC,qBAAqB,EAAEC,eAAe,EAAEC,aAAa,QAAQ,4CAA4C;AACxI,SAASC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