1 line
28 KiB
JSON
1 line
28 KiB
JSON
|
{"ast":null,"code":"import \"core-js/modules/es.array.slice.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*/\nimport { __extends } from \"tslib\";\nimport * as zrUtil from 'zrender/lib/core/util.js';\nimport VisualMapModel from './VisualMapModel.js';\nimport * as numberUtil from '../../util/number.js';\nimport { inheritDefaultOption } from '../../util/component.js'; // Constant\n\nvar DEFAULT_BAR_BOUND = [20, 140];\n\nvar ContinuousModel =\n/** @class */\nfunction (_super) {\n __extends(ContinuousModel, _super);\n\n function ContinuousModel() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.type = ContinuousModel.type;\n return _this;\n }\n /**\r\n * @override\r\n */\n\n\n ContinuousModel.prototype.optionUpdated = function (newOption, isInit) {\n _super.prototype.optionUpdated.apply(this, arguments);\n\n this.resetExtent();\n this.resetVisual(function (mappingOption) {\n mappingOption.mappingMethod = 'linear';\n mappingOption.dataExtent = this.getExtent();\n });\n\n this._resetRange();\n };\n /**\r\n * @protected\r\n * @override\r\n */\n\n\n ContinuousModel.prototype.resetItemSize = function () {\n _super.prototype.resetItemSize.apply(this, arguments);\n\n var itemSize = this.itemSize;\n (itemSize[0] == null || isNaN(itemSize[0])) && (itemSize[0] = DEFAULT_BAR_BOUND[0]);\n (itemSize[1] == null || isNaN(itemSize[1])) && (itemSize[1] = DEFAULT_BAR_BOUND[1]);\n };\n /**\r\n * @private\r\n */\n\n\n ContinuousModel.prototype._resetRange = function () {\n var dataExtent = this.getExtent();\n var range = this.option.range;\n\n if (!range || range.auto) {\n // `range` should always be array (so we dont use other\n // value like 'auto') for user-friend. (consider getOption).\n dataExtent.auto = 1;\n this.option.range = dataExtent;\n } else if (zrUtil.isArray(range)) {\n if (range[0] > range[1]) {\n range.reverse();\n }\n\n range[0] = Math.max(range[0], dataExtent[0]);\n range[1] = Math.min(range[1], dataExtent[1]);\n }\n };\n /**\r\n * @protected\r\n * @override\r\n */\n\n\n ContinuousModel.prototype.completeVisualOption = function () {\n _super.prototype.completeVisualOption.apply(this, arguments);\n\n zrUtil.each(this.stateList, function (state) {\n var symbolSize
|