1 line
5.7 KiB
JSON
1 line
5.7 KiB
JSON
{"ast":null,"code":"import \"core-js/modules/es.function.name.js\";\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\n\n/**\r\n * AUTO-GENERATED FILE. DO NOT MODIFY.\r\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nvar coordsOffsetMap = {\n '南海诸岛': [32, 80],\n // 全国\n '广东': [0, -10],\n '香港': [10, 5],\n '澳门': [-10, 10],\n //'北京': [-10, 0],\n '天津': [5, 5]\n};\nexport default function fixTextCoords(mapType, region) {\n if (mapType === 'china') {\n var coordFix = coordsOffsetMap[region.name];\n\n if (coordFix) {\n var cp = region.getCenter();\n cp[0] += coordFix[0] / 10.5;\n cp[1] += -coordFix[1] / (10.5 / 0.75);\n region.setCenter(cp);\n }\n }\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/coord/geo/fix/textCoord.js"],"names":["coordsOffsetMap","fixTextCoords","mapType","region","coordFix","name","cp","getCenter","setCenter"],"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,IAAIA,eAAe,GAAG;AACpB,UAAQ,CAAC,EAAD,EAAK,EAAL,CADY;AAEpB;AACA,QAAM,CAAC,CAAD,EAAI,CAAC,EAAL,CAHc;AAIpB,QAAM,CAAC,EAAD,EAAK,CAAL,CAJc;AAKpB,QAAM,CAAC,CAAC,EAAF,EAAM,EAAN,CALc;AAMpB;AACA,QAAM,CAAC,CAAD,EAAI,CAAJ;AAPc,CAAtB;AASA,eAAe,SAASC,aAAT,CAAuBC,OAAvB,EAAgCC,MAAhC,EAAwC;AACrD,MAAID,OAAO,KAAK,OAAhB,EAAyB;AACvB,QAAIE,QAAQ,GAAGJ,eAAe,CAACG,MAAM,CAACE,IAAR,CAA9B;;AAEA,QAAID,QAAJ,EAAc;AACZ,UAAIE,EAAE,GAAGH,MAAM,CAACI,SAAP,EAAT;AACAD,MAAAA,EAAE,CAAC,CAAD,CAAF,IAASF,QAAQ,CAAC,CAAD,CAAR,GAAc,IAAvB;AACAE,MAAAA,EAAE,CAAC,CAAD,CAAF,IAAS,CAACF,QAAQ,CAAC,CAAD,CAAT,IAAgB,OAAO,IAAvB,CAAT;AACAD,MAAAA,MAAM,CAACK,SAAP,CAAiBF,EAAjB;AACD;AACF;AACF","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\nvar coordsOffsetMap = {\r\n '南海诸岛': [32, 80],\r\n // 全国\r\n '广东': [0, -10],\r\n '香港': [10, 5],\r\n '澳门': [-10, 10],\r\n //'北京': [-10, 0],\r\n '天津': [5, 5]\r\n};\r\nexport default function fixTextCoords(mapType, region) {\r\n if (mapType === 'china') {\r\n var coordFix = coordsOffsetMap[region.name];\r\n\r\n if (coordFix) {\r\n var cp = region.getCenter();\r\n cp[0] += coordFix[0] / 10.5;\r\n cp[1] += -coordFix[1] / (10.5 / 0.75);\r\n region.setCenter(cp);\r\n }\r\n }\r\n}"]},"metadata":{},"sourceType":"module"} |