1 line
14 KiB
JSON
1 line
14 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 * as zrUtil from 'zrender/lib/core/util.js';\nimport * as visualSolution from '../../visual/visualSolution.js';\nimport Model from '../../model/Model.js';\nimport ComponentModel from '../../model/Component.js';\nvar DEFAULT_OUT_OF_BRUSH_COLOR = '#ddd';\n\nvar BrushModel =\n/** @class */\nfunction (_super) {\n __extends(BrushModel, _super);\n\n function BrushModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = BrushModel.type;\n /**\r\n * @readOnly\r\n */\n\n _this.areas = [];\n /**\r\n * Current brush painting area settings.\r\n * @readOnly\r\n */\n\n _this.brushOption = {};\n return _this;\n }\n\n BrushModel.prototype.optionUpdated = function (newOption, isInit) {\n var thisOption = this.option;\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']);\n var inBrush = thisOption.inBrush = thisOption.inBrush || {}; // Always give default visual, consider setOption at the second time.\n\n thisOption.outOfBrush = thisOption.outOfBrush || {\n color: DEFAULT_OUT_OF_BRUSH_COLOR\n };\n\n if (!inBrush.hasOwnProperty('liftZ')) {\n // Bigger than the highlight z lift, otherwise it will\n // be effected by the highlight z when brush.\n inBrush.liftZ = 5;\n }\n };\n /**\r\n * If `areas` is null/undefined, range state remain.\r\n */\n\n\n BrushModel.prototype.setAreas = function (areas) {\n if (process.env.NODE_ENV !== 'production') {\n zrUtil.assert(zrUtil.isArray(areas));\n zrUtil.each(areas, function (area) {\n zrUtil.assert(area.brushType, 'Illegal areas');\n });\n } // If areas is null/undefined, range state remain.\n // This helps user to dispatchAction({type: 'brush'}) with no areas\n // set but just want to get the current brush select info from a `brush` event.\n\n\n if (!areas) {\n return;\n }\n\n this.areas = zrUtil.map(areas, function (area) {\n return generateBrushOption(this.option, area);\n }, this);\n };\n /**\r\n * Set the current painting brush option.\r\n */\n\n\n BrushModel.prototype.setBrushOption = function (brushOption) {\n this.brushOption = generateBrushOption(this.option, brushOption);\n this.brushType = this.brushOption.brushType;\n };\n\n BrushModel.type = 'brush';\n BrushModel.dependencies = ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'];\n BrushModel.defaultOption = {\n seriesIndex: 'all',\n brushType: 'rect',\n brushMode: 'single',\n transformable: true,\n brushStyle: {\n borderWidth: 1,\n color: 'rgba(210,219,238,0.3)',\n borderColor: '#D2DBEE'\n },\n throttleType: 'fixRate',\n throttleDelay: 0,\n removeOnClick: true,\n z: 10000\n };\n return BrushModel;\n}(ComponentModel);\n\nfunction generateBrushOption(option, brushOption) {\n return zrUtil.merge({\n brushType: option.brushType,\n brushMode: option.brushMode,\n transformable: option.transformable,\n brushStyle: new Model(option.brushStyle).getItemStyle(),\n removeOnClick: option.removeOnClick,\n z: option.z\n }, brushOption, true);\n}\n\nexport default BrushModel;","map":{"version":3,"sources":["D:/Work/WorkSpace/GitWorkSpace/TenShop/resource/ElectronicMall/src/qingge-Market/qingge-vue/node_modules/echarts/lib/component/brush/BrushModel.js"],"names":["__extends","zrUtil","visualSolution","Model","ComponentModel","DEFAULT_OUT_OF_BRUSH_COLOR","BrushModel","_super","_this","apply","arguments","type","areas","brushOption","prototype","optionUpdated","newOption","isInit","thisOption","option","replaceVisualOption","inBrush","outOfBrush","color","hasOwnProperty","liftZ","setAreas","process","env","NODE_ENV","assert","isArray","each","area","brushType","map","generateBrushOption","setBrushOption","dependencies","defaultOption","seriesIndex","brushMode","transformable","brushStyle","borderWidth","borderColor","throttleType","throttleDelay","removeOnClick","z","merge","getItemStyle"],"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,OAAO,KAAKC,MAAZ,MAAwB,0BAAxB;AACA,OAAO,KAAKC,cAAZ,MAAgC,gCAAhC;AACA,OAAOC,KAAP,MAAkB,sBAAlB;AACA,OAAOC,cAAP,MAA2B,0BAA3B;AACA,IAAIC,0BAA0B,GAAG,MAAjC;;AAEA,IAAIC,UAAU;AACd;AACA,UAAUC,MAAV,EAAkB;AAChBP,EAAAA,SAAS,CAACM,UAAD,EAAaC,MAAb,CAAT;;AAEA,WAASD,UAAT,GAAsB;AACpB,QAAIE,KAAK,GAAGD,MAAM,KAAK,IAAX,IAAmBA,MAAM,CAACE,KAAP,CAAa,IAAb,EAAmBC,SAAnB,CAAnB,IA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,MAA7B,EAAqCN,WAArC,EAAkD;AAChD,SAAOZ,MAAM,CAACiD,KAAP,CAAa;AAClBhB,IAAAA,SAAS,EAAEf,MAAM,CAACe,SADA;AAElBO,IAAAA,SAAS,EAAEtB,MAAM,CAACsB,SAFA;AAGlBC,IAAAA,aAAa,EAAEvB,MAAM,CAACuB,aAHJ;AAIlBC,IAAAA,UAAU,EAAE,IAAIxC,KAAJ,CAAUgB,MAAM,CAACwB,UAAjB,EAA6BQ,YAA7B,EAJM;AAKlBH,IAAAA,aAAa,EAAE7B,MAAM,CAAC6B,aALJ;AAMlBC,IAAAA,CAAC,EAAE9B,MAAM,CAAC8B;AANQ,GAAb,EAOJpC,WAPI,EAOS,IAPT,CAAP;AAQD;;AAED,eAAeP,UAAf","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 { __extends } from \"tslib\";\r\nimport * as zrUtil from 'zrender/lib/core/util.js';\r\nimport * as visualSolution from '../../visual/visualSolution.js';\r\nimport Model from '../../model/Model.js';\r\nimport ComponentModel from '../../model/Component.js';\r\nvar DEFAULT_OUT_OF_BRUSH_COLOR = '#ddd';\r\n\r\nvar BrushModel =\r\n/** @class */\r\nfunction (_super) {\r\n __extends(BrushModel, _super);\r\n\r\n function BrushModel() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n\r\n _this.type = BrushModel.type;\r\n /**\r\n * @readOnly\r\n */\r\n\r\n _this.areas = [];\r\n /**\r\n * Current brush painting area settings.\r\n * @readOnly\r\n */\r\n\r\n _this.brushOption = {};\r\n return _this;\r\n }\r\n\r\n BrushModel.prototype.optionUpdated = function (newOption, isInit) {\r\n var thisOption = this.option;\r\n !isInit && visualSolution.replaceVisualOption(thisOption, newOption, ['inBrush', 'outOfBrush']);\r\n var inBrush = thisOption.inBrush = thisOption.inBrush || {}; // Always give default visual, consider setOption at the second time.\r\n\r\n thisOption.outOfBrush = thisOption.outOfBrush || {\r\n color: DEFAULT_OUT_OF_BRUSH_COLOR\r\n };\r\n\r\n if (!inBrush.hasOwnProperty('liftZ')) {\r\n // Bigger than the highlight z lift, otherwise it will\r\n // be effected by the highlight z when brush.\r\n inBrush.liftZ = 5;\r\n }\r\n };\r\n /**\r\n * If `areas` is null/undefined, range state remain.\r\n */\r\n\r\n\r\n BrushModel.prototype.setAreas = function (areas) {\r\n if (process.env.NODE_ENV !== 'production') {\r\n zrUtil.assert(zrUtil.isArray(areas));\r\n zrUtil.each(areas, function (area) {\r\n zrUtil.assert(area.brushType, 'Illegal areas');\r\n });\r\n } // If areas is null/undefined, range state remain.\r\n // This helps user to dispatchAction({type: 'brush'}) with no areas\r\n // set but just want to get the current brush select info from a `brush` event.\r\n\r\n\r\n if (!areas) {\r\n return;\r\n }\r\n\r\n this.areas = zrUtil.map(areas, function (area) {\r\n return generateBrushOption(this.option, area);\r\n }, this);\r\n };\r\n /**\r\n * Set the current painting brush option.\r\n */\r\n\r\n\r\n BrushModel.prototype.setBrushOption = function (brushOption) {\r\n this.brushOption = generateBrushOption(this.option, brushOption);\r\n this.brushType = this.brushOption.brushType;\r\n };\r\n\r\n BrushModel.type = 'brush';\r\n BrushModel.dependencies = ['geo', 'grid', 'xAxis', 'yAxis', 'parallel', 'series'];\r\n BrushModel.defaultOption = {\r\n seriesIndex: 'all',\r\n brushType: 'rect',\r\n brushMode: 'single',\r\n transformable: true,\r\n brushStyle: {\r\n borderWidth: 1,\r\n color: 'rgba(210,219,238,0.3)',\r\n borderColor: '#D2DBEE'\r\n },\r\n throttleType: 'fixRate',\r\n throttleDelay: 0,\r\n removeOnClick: true,\r\n z: 10000\r\n };\r\n return BrushModel;\r\n}(ComponentModel);\r\n\r\nfunction generateBrushOption(option, brushOption) {\r\n return zrUtil.merge({\r\n brushType: option.brushType,\r\n brushMode: option.brushMode,\r\n transformable: option.transformable,\r\n brushStyle: new Model(option.brushStyle).getItemStyle(),\r\n removeOnClick: option.removeOnClick,\r\n z: option.z\r\n }, brushOption, true);\r\n}\r\n\r\nexport default BrushModel;"]},"metadata":{},"sourceType":"module"} |