qauMaWeb/node_modules/.cache/babel-loader/e42c7caeaf8b02bc4a36b3377ea...

1 line
8.6 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*/\nfunction getCenterCoord(view, point) {\n // Use projected coord as center because it's linear.\n return view.pointToProjected ? view.pointToProjected(point) : view.pointToData(point);\n}\n\nexport function updateCenterAndZoom(view, payload, zoomLimit) {\n var previousZoom = view.getZoom();\n var center = view.getCenter();\n var zoom = payload.zoom;\n var point = view.projectedToPoint ? view.projectedToPoint(center) : view.dataToPoint(center);\n\n if (payload.dx != null && payload.dy != null) {\n point[0] -= payload.dx;\n point[1] -= payload.dy;\n view.setCenter(getCenterCoord(view, point));\n }\n\n if (zoom != null) {\n if (zoomLimit) {\n var zoomMin = zoomLimit.min || 0;\n var zoomMax = zoomLimit.max || Infinity;\n zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom;\n } // Zoom on given point(originX, originY)\n\n\n view.scaleX *= zoom;\n view.scaleY *= zoom;\n var fixX = (payload.originX - view.x) * (zoom - 1);\n var fixY = (payload.originY - view.y) * (zoom - 1);\n view.x -= fixX;\n view.y -= fixY;\n view.updateTransform(); // Get the new center\n\n view.setCenter(getCenterCoord(view, point));\n view.setZoom(zoom * previousZoom);\n }\n\n return {\n center: view.getCenter(),\n zoom: view.getZoom()\n };\n}","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/action/roamHelper.js"],"names":["getCenterCoord","view","point","pointToProjected","pointToData","updateCenterAndZoom","payload","zoomLimit","previousZoom","getZoom","center","getCenter","zoom","projectedToPoint","dataToPoint","dx","dy","setCenter","zoomMin","min","zoomMax","max","Infinity","Math","scaleX","scaleY","fixX","originX","x","fixY","originY","y","updateTransform","setZoom"],"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,cAAT,CAAwBC,IAAxB,EAA8BC,KAA9B,EAAqC;AACnC;AACA,SAAOD,IAAI,CAACE,gBAAL,GAAwBF,IAAI,CAACE,gBAAL,CAAsBD,KAAtB,CAAxB,GAAuDD,IAAI,CAACG,WAAL,CAAiBF,KAAjB,CAA9D;AACD;;AAED,OAAO,SAASG,mBAAT,CAA6BJ,IAA7B,EAAmCK,OAAnC,EAA4CC,SAA5C,EAAuD;AAC5D,MAAIC,YAAY,G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AI,GAAG,CAArC,CAAX;AACAX,IAAAA,IAAI,CAAC2B,CAAL,IAAUF,IAAV;AACAzB,IAAAA,IAAI,CAAC8B,CAAL,IAAUF,IAAV;AACA5B,IAAAA,IAAI,CAAC+B,eAAL,GAdgB,CAcQ;;AAExB/B,IAAAA,IAAI,CAACgB,SAAL,CAAejB,cAAc,CAACC,IAAD,EAAOC,KAAP,CAA7B;AACAD,IAAAA,IAAI,CAACgC,OAAL,CAAarB,IAAI,GAAGJ,YAApB;AACD;;AAED,SAAO;AACLE,IAAAA,MAAM,EAAET,IAAI,CAACU,SAAL,EADH;AAELC,IAAAA,IAAI,EAAEX,IAAI,CAACQ,OAAL;AAFD,GAAP;AAID","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\nfunction getCenterCoord(view, point) {\r\n // Use projected coord as center because it's linear.\r\n return view.pointToProjected ? view.pointToProjected(point) : view.pointToData(point);\r\n}\r\n\r\nexport function updateCenterAndZoom(view, payload, zoomLimit) {\r\n var previousZoom = view.getZoom();\r\n var center = view.getCenter();\r\n var zoom = payload.zoom;\r\n var point = view.projectedToPoint ? view.projectedToPoint(center) : view.dataToPoint(center);\r\n\r\n if (payload.dx != null && payload.dy != null) {\r\n point[0] -= payload.dx;\r\n point[1] -= payload.dy;\r\n view.setCenter(getCenterCoord(view, point));\r\n }\r\n\r\n if (zoom != null) {\r\n if (zoomLimit) {\r\n var zoomMin = zoomLimit.min || 0;\r\n var zoomMax = zoomLimit.max || Infinity;\r\n zoom = Math.max(Math.min(previousZoom * zoom, zoomMax), zoomMin) / previousZoom;\r\n } // Zoom on given point(originX, originY)\r\n\r\n\r\n view.scaleX *= zoom;\r\n view.scaleY *= zoom;\r\n var fixX = (payload.originX - view.x) * (zoom - 1);\r\n var fixY = (payload.originY - view.y) * (zoom - 1);\r\n view.x -= fixX;\r\n view.y -= fixY;\r\n view.updateTransform(); // Get the new center\r\n\r\n view.setCenter(getCenterCoord(view, point));\r\n view.setZoom(zoom * previousZoom);\r\n }\r\n\r\n return {\r\n center: view.getCenter(),\r\n zoom: view.getZoom()\r\n };\r\n}"]},"metadata":{},"sourceType":"module"}