123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- import { __extends } from "tslib";
- import * as zrUtil from 'zrender/lib/core/util.js';
- import * as featureManager from './featureManager.js';
- import ComponentModel from '../../model/Component.js';
- var ToolboxModel = function (_super) {
- __extends(ToolboxModel, _super);
- function ToolboxModel() {
- var _this = _super !== null && _super.apply(this, arguments) || this;
- _this.type = ToolboxModel.type;
- return _this;
- }
- ToolboxModel.prototype.optionUpdated = function () {
- _super.prototype.optionUpdated.apply(this, arguments);
- var ecModel = this.ecModel;
- zrUtil.each(this.option.feature, function (featureOpt, featureName) {
- var Feature = featureManager.getFeature(featureName);
- if (Feature) {
- if (Feature.getDefaultOption) {
- Feature.defaultOption = Feature.getDefaultOption(ecModel);
- }
- zrUtil.merge(featureOpt, Feature.defaultOption);
- }
- });
- };
- ToolboxModel.type = 'toolbox';
- ToolboxModel.layoutMode = {
- type: 'box',
- ignoreSize: true
- };
- ToolboxModel.defaultOption = {
- show: true,
- z: 6,
-
- orient: 'horizontal',
- left: 'right',
- top: 'top',
-
-
- backgroundColor: 'transparent',
- borderColor: '#ccc',
- borderRadius: 0,
- borderWidth: 0,
- padding: 5,
- itemSize: 15,
- itemGap: 8,
- showTitle: true,
- iconStyle: {
- borderColor: '#666',
- color: 'none'
- },
- emphasis: {
- iconStyle: {
- borderColor: '#3E98C5'
- }
- },
-
-
- tooltip: {
- show: false,
- position: 'bottom'
- }
- };
- return ToolboxModel;
- }(ComponentModel);
- export default ToolboxModel;
|