UNPKG

cione-comp-lib

Version:

`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`

62 lines (61 loc) 1.68 kB
import { __extends } from "../../../../tslib/tslib.es6.mjs"; import { each, merge } from "../../../../zrender/lib/core/util.mjs"; import { getFeature } from "./featureManager.mjs"; import ComponentModel from "../../model/Component.mjs"; var ToolboxModel = function(_super) { __extends(ToolboxModel2, _super); function ToolboxModel2() { var _this = _super !== null && _super.apply(this, arguments) || this; _this.type = ToolboxModel2.type; return _this; } ToolboxModel2.prototype.optionUpdated = function() { _super.prototype.optionUpdated.apply(this, arguments); var ecModel = this.ecModel; each(this.option.feature, function(featureOpt, featureName) { var Feature = getFeature(featureName); if (Feature) { if (Feature.getDefaultOption) { Feature.defaultOption = Feature.getDefaultOption(ecModel); } merge(featureOpt, Feature.defaultOption); } }); }; ToolboxModel2.type = "toolbox"; ToolboxModel2.layoutMode = { type: "box", ignoreSize: true }; ToolboxModel2.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 ToolboxModel2; }(ComponentModel); var ToolboxModel$1 = ToolboxModel; export { ToolboxModel$1 as default };