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

1 line
18 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 { __extends } from \"tslib\";\nimport BaseAxisPointer from './BaseAxisPointer.js';\nimport * as graphic from '../../util/graphic.js';\nimport * as viewHelper from './viewHelper.js';\nimport * as matrix from 'zrender/lib/core/matrix.js';\nimport AxisBuilder from '../axis/AxisBuilder.js';\n\nvar PolarAxisPointer =\n/** @class */\nfunction (_super) {\n __extends(PolarAxisPointer, _super);\n\n function PolarAxisPointer() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\r\n * @override\r\n */\n\n\n PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\n var axis = axisModel.axis;\n\n if (axis.dim === 'angle') {\n this.animationThreshold = Math.PI / 18;\n }\n\n var polar = axis.polar;\n var otherAxis = polar.getOtherAxis(axis);\n var otherExtent = otherAxis.getExtent();\n var coordValue = axis.dataToCoord(value);\n var axisPointerType = axisPointerModel.get('type');\n\n if (axisPointerType && axisPointerType !== 'none') {\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent);\n pointerOption.style = elStyle;\n elOption.graphicKey = pointerOption.type;\n elOption.pointer = pointerOption;\n }\n\n var labelMargin = axisPointerModel.get(['label', 'margin']);\n var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin);\n viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos);\n };\n\n return PolarAxisPointer;\n}(BaseAxisPointer);\n\n;\n\nfunction getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) {\n var axis = axisModel.axis;\n var coord = axis.dataToCoord(value);\n var axisAngle = polar.getAngleAxis().getExtent()[0];\n axisAngle = axisAngle / 180 * Math.PI;\n var radiusExtent = polar.getRadiusAxis().getExtent();\n var position;\n var align;\n var verticalAlign;\n\n if (axis.dim === 'radius') {\n var transform = matrix.create();\n matrix.rotate(transform, transform, axisAngle);\n matrix.translate(transform, transform, [polar.cx, polar.cy]);\n position = graphic.applyTransform([coord, -labelMargin], transform);\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0; // @ts-ignore\n\n var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1);\n align = labelLayout.textAlign;\n verticalAlign = labelLayout.textVerticalAlign;\n } else {\n // angle axis\n var r = radiusExtent[1];\n position = polar.coordToPoint([r + labelMargin, coord]);\n var cx = polar.cx;\n var cy = polar.cy;\n align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right';\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom';\n }\n\n return {\n position: position,\n align: align,\n verticalAlign: verticalAlign\n };\n}\n\nvar pointerShapeBuilder = {\n line: function line(axis, polar, coordValue, otherExtent) {\n return axis.dim === 'angle' ? {\n type: 'Line',\n shape: viewHelper.makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue]))\n } : {\n type: 'Circle',\n shape: {\n cx: polar.cx,\n cy: polar.cy,\n r: coordValue\n }\n };\n },\n shadow: function shadow(axis, polar, coordValue, otherExtent) {\n var bandWidth = Math.max(1, axis.getBandWidth());\n var radian = Math.PI / 180;\n return axis.dim === 'angle' ? {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1], // In ECharts y is negative if angle is positive\n (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian)\n } : {\n type: 'Sector',\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2)\n };\n }\n};\nexport default PolarAxisPointer;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/axisPointer/PolarAxisPointer.js"],"names":["__extends","BaseAxisPointer","graphic","viewHelper","matrix","AxisBuilder","PolarAxisPointer","_super","apply","arguments","prototype","makeElOption","elOption","value","axisModel","axisPointerModel","api","axis","dim","animationThreshold","Math","PI","polar","otherAxis","getOtherAxis","otherExtent","getExtent","coordValue","dataToCoord","axisPointerType","get","elStyle","buildElStyle","pointerOption","pointerShapeBuilder","style","graphicKey","type","pointer","labelMargin","labelPos","getLabelPosition","buildLabelElOption","coord","axisAngle","getAngleAxis","radiusExtent","getRadiusAxis","position","align","verticalAlign","transform","create","rotate","translate","cx","cy","applyTransform","labelRotation","getModel","labelLayout","innerTextLayout","textAlign","textVerticalAlign","r","coordToPoint","abs","line","shape","makeLineShape","shadow","bandWidth","max","getBandWidth","radian","makeSectorShape"],"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,SAAT,QAA0B,OAA1B;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAO,KAAKC,OAAZ,MAAyB,uBAAzB;AACA,OAAO,KAAKC,UAAZ,MAA4B,iBAA5B;AACA,OAAO,KAAKC,MAAZ,MAAwB,4BAAxB;AACA,OAAOC,WAAP,MAAwB,wBAAxB;;AAEA,IAAIC,gBAAgB;AACpB;AACA,UAAUC,MAAV,EAAkB;AAChBP,EAAAA,SAAS,CAACM,gBAAD,EAAmBC,MAAnB,CAAT;;AAEA,WAASD,gBAAT,GAA4B;AAC1B,WAAOC,MAAM,KAAK,IAAX,IAAmBA,MAAM,CAACC,KAAP,CAAa,IAAb,EAAmBC,SAAnB,CAAnB,IAAoD,IAA3D;AACD;AACD;AACF;AACA;;;AAGEH,EAAAA,gBAAgB,CAACI,SAAjB,CAA2BC,YAA3B,GAA0C,UAAUC,QAAV,EAAoBC,KAApB,EAA2BC,SAA3B,EAAsCC,gBAAtC,EAAwDC,GAAxD,EAA6D;AACrG,QAAIC,IAAI,GAAGH,SAAS,CAACG,IAArB;;AAEA,QAAIA,IAAI,CAACC,GAAL,KAAa,OAAjB,EAA0B;AACxB,WAAKC,kBAAL,GAA0BC,IAAI,CAACC,EAAL,GAAU,EAApC;AACD;;AAED,QAAIC,KAAK,GAAGL,IAAI,CAACK,KAAjB;AACA,QAAIC,SAAS,GAAGD,KAAK,CAACE,YAAN,CAAmBP,IAAnB,CAAhB;AACA,QAAIQ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ements. 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 { __extends } from \"tslib\";\r\nimport BaseAxisPointer from './BaseAxisPointer.js';\r\nimport * as graphic from '../../util/graphic.js';\r\nimport * as viewHelper from './viewHelper.js';\r\nimport * as matrix from 'zrender/lib/core/matrix.js';\r\nimport AxisBuilder from '../axis/AxisBuilder.js';\r\n\r\nvar PolarAxisPointer =\r\n/** @class */\r\nfunction (_super) {\r\n __extends(PolarAxisPointer, _super);\r\n\r\n function PolarAxisPointer() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n /**\r\n * @override\r\n */\r\n\r\n\r\n PolarAxisPointer.prototype.makeElOption = function (elOption, value, axisModel, axisPointerModel, api) {\r\n var axis = axisModel.axis;\r\n\r\n if (axis.dim === 'angle') {\r\n this.animationThreshold = Math.PI / 18;\r\n }\r\n\r\n var polar = axis.polar;\r\n var otherAxis = polar.getOtherAxis(axis);\r\n var otherExtent = otherAxis.getExtent();\r\n var coordValue = axis.dataToCoord(value);\r\n var axisPointerType = axisPointerModel.get('type');\r\n\r\n if (axisPointerType && axisPointerType !== 'none') {\r\n var elStyle = viewHelper.buildElStyle(axisPointerModel);\r\n var pointerOption = pointerShapeBuilder[axisPointerType](axis, polar, coordValue, otherExtent);\r\n pointerOption.style = elStyle;\r\n elOption.graphicKey = pointerOption.type;\r\n elOption.pointer = pointerOption;\r\n }\r\n\r\n var labelMargin = axisPointerModel.get(['label', 'margin']);\r\n var labelPos = getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin);\r\n viewHelper.buildLabelElOption(elOption, axisModel, axisPointerModel, api, labelPos);\r\n };\r\n\r\n return PolarAxisPointer;\r\n}(BaseAxisPointer);\r\n\r\n;\r\n\r\nfunction getLabelPosition(value, axisModel, axisPointerModel, polar, labelMargin) {\r\n var axis = axisModel.axis;\r\n var coord = axis.dataToCoord(value);\r\n var axisAngle = polar.getAngleAxis().getExtent()[0];\r\n axisAngle = axisAngle / 180 * Math.PI;\r\n var radiusExtent = polar.getRadiusAxis().getExtent();\r\n var position;\r\n var align;\r\n var verticalAlign;\r\n\r\n if (axis.dim === 'radius') {\r\n var transform = matrix.create();\r\n matrix.rotate(transform, transform, axisAngle);\r\n matrix.translate(transform, transform, [polar.cx, polar.cy]);\r\n position = graphic.applyTransform([coord, -labelMargin], transform);\r\n var labelRotation = axisModel.getModel('axisLabel').get('rotate') || 0; // @ts-ignore\r\n\r\n var labelLayout = AxisBuilder.innerTextLayout(axisAngle, labelRotation * Math.PI / 180, -1);\r\n align = labelLayout.textAlign;\r\n verticalAlign = labelLayout.textVerticalAlign;\r\n } else {\r\n // angle axis\r\n var r = radiusExtent[1];\r\n position = polar.coordToPoint([r + labelMargin, coord]);\r\n var cx = polar.cx;\r\n var cy = polar.cy;\r\n align = Math.abs(position[0] - cx) / r < 0.3 ? 'center' : position[0] > cx ? 'left' : 'right';\r\n verticalAlign = Math.abs(position[1] - cy) / r < 0.3 ? 'middle' : position[1] > cy ? 'top' : 'bottom';\r\n }\r\n\r\n return {\r\n position: position,\r\n align: align,\r\n verticalAlign: verticalAlign\r\n };\r\n}\r\n\r\nvar pointerShapeBuilder = {\r\n line: function (axis, polar, coordValue, otherExtent) {\r\n return axis.dim === 'angle' ? {\r\n type: 'Line',\r\n shape: viewHelper.makeLineShape(polar.coordToPoint([otherExtent[0], coordValue]), polar.coordToPoint([otherExtent[1], coordValue]))\r\n } : {\r\n type: 'Circle',\r\n shape: {\r\n cx: polar.cx,\r\n cy: polar.cy,\r\n r: coordValue\r\n }\r\n };\r\n },\r\n shadow: function (axis, polar, coordValue, otherExtent) {\r\n var bandWidth = Math.max(1, axis.getBandWidth());\r\n var radian = Math.PI / 180;\r\n return axis.dim === 'angle' ? {\r\n type: 'Sector',\r\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, otherExtent[0], otherExtent[1], // In ECharts y is negative if angle is positive\r\n (-coordValue - bandWidth / 2) * radian, (-coordValue + bandWidth / 2) * radian)\r\n } : {\r\n type: 'Sector',\r\n shape: viewHelper.makeSectorShape(polar.cx, polar.cy, coordValue - bandWidth / 2, coordValue + bandWidth / 2, 0, Math.PI * 2)\r\n };\r\n }\r\n};\r\nexport default PolarAxisPointer;"]},"metadata":{},"sourceType":"module"}