1 line
7.7 KiB
JSON
1 line
7.7 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';\n\nfunction dataToCoordSize(dataSize, dataItem) {\n dataItem = dataItem || [0, 0];\n return zrUtil.map([0, 1], function (dimIdx) {\n var val = dataItem[dimIdx];\n var halfSize = dataSize[dimIdx] / 2;\n var p1 = [];\n var p2 = [];\n p1[dimIdx] = val - halfSize;\n p2[dimIdx] = val + halfSize;\n p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];\n return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);\n }, this);\n}\n\nexport default function geoPrepareCustom(coordSys) {\n var rect = coordSys.getBoundingRect();\n return {\n coordSys: {\n type: 'geo',\n x: rect.x,\n y: rect.y,\n width: rect.width,\n height: rect.height,\n zoom: coordSys.getZoom()\n },\n api: {\n coord: function coord(data) {\n // do not provide \"out\" and noRoam param,\n // Compatible with this usage:\n // echarts.util.map(item.points, api.coord)\n return coordSys.dataToPoint(data);\n },\n size: zrUtil.bind(dataToCoordSize, coordSys)\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/prepareCustom.js"],"names":["zrUtil","dataToCoordSize","dataSize","dataItem","map","dimIdx","val","halfSize","p1","p2","Math","abs","dataToPoint","geoPrepareCustom","coordSys","rect","getBoundingRect","type","x","y","width","height","zoom","getZoom","api","coord","data","size","bind"],"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;;AAEA,SAASC,eAAT,CAAyBC,QAAzB,EAAmCC,QAAnC,EAA6C;AAC3CA,EAAAA,QAAQ,GAAGA,QAAQ,IAAI,CAAC,CAAD,EAAI,CAAJ,CAAvB;AACA,SAAOH,MAAM,CAACI,GAAP,CAAW,CAAC,CAAD,EAAI,CAAJ,CAAX,EAAmB,UAAUC,MAAV,EAAkB;AAC1C,QAAIC,GAAG,GAAGH,QAAQ,CAACE,MAAD,CAAlB;AACA,QAAIE,QAAQ,GAAGL,QAAQ,CAACG,MAAD,CAAR,GAAmB,CAAlC;AACA,QAAIG,EAAE,GAAG,EAAT;AACA,QAAIC,EAAE,GAAG,EAAT;AACAD,IAAAA,EAAE,CAACH,MAAD,CAAF,GAAaC,GAAG,GAAGC,QAAnB;AACAE,IAAAA,EAAE,CAACJ,MAAD,CAAF,GAAaC,GAAG,GAAGC,QAAnB;AACAC,IAAAA,EAAE,CAAC,IAAIH,MAAL,CAAF,GAAiBI,EAAE,CAAC,IAAIJ,MAAL,CAAF,GAAiBF,QAAQ,CAAC,IAAIE,MAAL,CAA1C;AACA,WAAOK,IAAI,CAACC,GAAL,CAAS,KAAKC,WAAL,CAAiBJ,EAAjB,EAAqBH,MAArB,IAA+B,KAAKO,WAAL,CAAiBH,EAAjB,EAAqBJ,MAArB,CAAxC,CAAP;AACD,GATM,EASJ,IATI,CAAP;AAUD;;AAED,eAAe,SAASQ,gBAAT,CAA0BC,QAA1B,EAAoC;AACjD,MAAIC,IAAI,GAAGD,QAAQ,CAACE,eAAT,EAAX;AACA,SAAO;AACLF,IAAAA,QAAQ,EAAE;AACRG,MAAAA,IAAI,EAAE,KADE;AAERC,MAAAA,CAAC,EAAEH,IAAI,CAACG,CAFA;AAGRC,MAAAA,CAAC,EAAEJ,IAAI,CAACI,CAHA;AAIRC,MAAAA,KAAK,EAAEL,IAAI,CAACK,KAJJ;AAKRC,MAAAA,MAAM,EAAEN,IAAI,CAACM,MALL;AAMRC,MAAAA,IAAI,EAAER,QAAQ,CAACS,OAAT;AANE,KADL;AASLC,IAAAA,GAAG,EAAE;AACHC,MAAAA,KAAK,EAAE,eAAUC,IAAV,EAAgB;AACrB;AACA;AACA;AACA,eAAOZ,QAAQ,CAACF,WAAT,CAAqBc,IAArB,CAAP;AACD,OANE;AAOHC,MAAAA,IAAI,EAAE3B,MAAM,CAAC4B,IAAP,CAAY3B,eAAZ,EAA6Ba,QAA7B;AAPH;AATA,GAAP;AAmBD","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\n\r\nfunction dataToCoordSize(dataSize, dataItem) {\r\n dataItem = dataItem || [0, 0];\r\n return zrUtil.map([0, 1], function (dimIdx) {\r\n var val = dataItem[dimIdx];\r\n var halfSize = dataSize[dimIdx] / 2;\r\n var p1 = [];\r\n var p2 = [];\r\n p1[dimIdx] = val - halfSize;\r\n p2[dimIdx] = val + halfSize;\r\n p1[1 - dimIdx] = p2[1 - dimIdx] = dataItem[1 - dimIdx];\r\n return Math.abs(this.dataToPoint(p1)[dimIdx] - this.dataToPoint(p2)[dimIdx]);\r\n }, this);\r\n}\r\n\r\nexport default function geoPrepareCustom(coordSys) {\r\n var rect = coordSys.getBoundingRect();\r\n return {\r\n coordSys: {\r\n type: 'geo',\r\n x: rect.x,\r\n y: rect.y,\r\n width: rect.width,\r\n height: rect.height,\r\n zoom: coordSys.getZoom()\r\n },\r\n api: {\r\n coord: function (data) {\r\n // do not provide \"out\" and noRoam param,\r\n // Compatible with this usage:\r\n // echarts.util.map(item.points, api.coord)\r\n return coordSys.dataToPoint(data);\r\n },\r\n size: zrUtil.bind(dataToCoordSize, coordSys)\r\n }\r\n };\r\n}"]},"metadata":{},"sourceType":"module"} |