qauMaWeb/node_modules/.cache/babel-loader/52f3d0ff903bb76cffa82e31b28...

1 line
9.4 KiB
JSON

{"ast":null,"code":"/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport * as zrUtil from 'zrender/lib/core/util.js';\nexport default function mapSymbolLayout(ecModel) {\n var processedMapType = {};\n ecModel.eachSeriesByType('map', function (mapSeries) {\n var mapType = mapSeries.getMapType();\n\n if (mapSeries.getHostGeoModel() || processedMapType[mapType]) {\n return;\n }\n\n var mapSymbolOffsets = {};\n zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {\n var geo = subMapSeries.coordinateSystem;\n var data = subMapSeries.originalData;\n\n if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) {\n data.each(data.mapDimension('value'), function (value, idx) {\n var name = data.getName(idx);\n var region = geo.getRegion(name); // If input series.data is [11, 22, '-'/null/undefined, 44],\n // it will be filled with NaN: [11, 22, NaN, 44] and NaN will\n // not be drawn. So here must validate if value is NaN.\n\n if (!region || isNaN(value)) {\n return;\n }\n\n var offset = mapSymbolOffsets[name] || 0;\n var point = geo.dataToPoint(region.getCenter());\n mapSymbolOffsets[name] = offset + 1;\n data.setItemLayout(idx, {\n point: point,\n offset: offset\n });\n });\n }\n }); // Show label of those region not has legendIcon (which is offset 0)\n\n var data = mapSeries.getData();\n data.each(function (idx) {\n var name = data.getName(idx);\n var layout = data.getItemLayout(idx) || {};\n layout.showLabel = !mapSymbolOffsets[name];\n data.setItemLayout(idx, layout);\n });\n processedMapType[mapType] = true;\n });\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/chart/map/mapSymbolLayout.js"],"names":["zrUtil","mapSymbolLayout","ecModel","processedMapType","eachSeriesByType","mapSeries","mapType","getMapType","getHostGeoModel","mapSymbolOffsets","each","seriesGroup","subMapSeries","geo","coordinateSystem","data","originalData","get","getComponent","mapDimension","value","idx","name","getName","region","getRegion","isNaN","offset","point","dataToPoint","getCenter","setItemLayout","getData","layout","getItemLayout","showLabel"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,MAAZ,MAAwB,0BAAxB;AACA,eAAe,SAASC,eAAT,CAAyBC,OAAzB,EAAkC;AAC/C,MAAIC,gBAAgB,GAAG,EAAvB;AACAD,EAAAA,OAAO,CAACE,gBAAR,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xBD,EARmD,CAgC/C;;AAEJ,QAAIZ,IAAI,GAAGV,SAAS,CAAC2B,OAAV,EAAX;AACAjB,IAAAA,IAAI,CAACL,IAAL,CAAU,UAAUW,GAAV,EAAe;AACvB,UAAIC,IAAI,GAAGP,IAAI,CAACQ,OAAL,CAAaF,GAAb,CAAX;AACA,UAAIY,MAAM,GAAGlB,IAAI,CAACmB,aAAL,CAAmBb,GAAnB,KAA2B,EAAxC;AACAY,MAAAA,MAAM,CAACE,SAAP,GAAmB,CAAC1B,gBAAgB,CAACa,IAAD,CAApC;AACAP,MAAAA,IAAI,CAACgB,aAAL,CAAmBV,GAAnB,EAAwBY,MAAxB;AACD,KALD;AAMA9B,IAAAA,gBAAgB,CAACG,OAAD,CAAhB,GAA4B,IAA5B;AACD,GA1CD;AA2CD","sourcesContent":["\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\n\r\n\r\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\r\n\r\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nexport default function mapSymbolLayout(ecModel) {\r\n var processedMapType = {};\r\n ecModel.eachSeriesByType('map', function (mapSeries) {\r\n var mapType = mapSeries.getMapType();\r\n\r\n if (mapSeries.getHostGeoModel() || processedMapType[mapType]) {\r\n return;\r\n }\r\n\r\n var mapSymbolOffsets = {};\r\n zrUtil.each(mapSeries.seriesGroup, function (subMapSeries) {\r\n var geo = subMapSeries.coordinateSystem;\r\n var data = subMapSeries.originalData;\r\n\r\n if (subMapSeries.get('showLegendSymbol') && ecModel.getComponent('legend')) {\r\n data.each(data.mapDimension('value'), function (value, idx) {\r\n var name = data.getName(idx);\r\n var region = geo.getRegion(name); // If input series.data is [11, 22, '-'/null/undefined, 44],\r\n // it will be filled with NaN: [11, 22, NaN, 44] and NaN will\r\n // not be drawn. So here must validate if value is NaN.\r\n\r\n if (!region || isNaN(value)) {\r\n return;\r\n }\r\n\r\n var offset = mapSymbolOffsets[name] || 0;\r\n var point = geo.dataToPoint(region.getCenter());\r\n mapSymbolOffsets[name] = offset + 1;\r\n data.setItemLayout(idx, {\r\n point: point,\r\n offset: offset\r\n });\r\n });\r\n }\r\n }); // Show label of those region not has legendIcon (which is offset 0)\r\n\r\n var data = mapSeries.getData();\r\n data.each(function (idx) {\r\n var name = data.getName(idx);\r\n var layout = data.getItemLayout(idx) || {};\r\n layout.showLabel = !mapSymbolOffsets[name];\r\n data.setItemLayout(idx, layout);\r\n });\r\n processedMapType[mapType] = true;\r\n });\r\n}"]},"metadata":{},"sourceType":"module"}