NuclearDispersionSystem/ant-design-vue-jeecg/node_modules/@antv/g2/lib/interaction/action/base.js
2023-09-14 14:47:11 +08:00

38 lines
908 B
Java
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var util_1 = require("@antv/util");
/**
* Action 的基类
*/
var Action = /** @class */ (function () {
function Action(context, cfg) {
this.context = context;
this.cfg = cfg;
context.addAction(this);
}
/**
* 设置配置项传入的值
* @param cfg
*/
Action.prototype.applyCfg = function (cfg) {
util_1.assign(this, cfg);
};
/**
* Inits action提供给子类用于继承
*/
Action.prototype.init = function () {
this.applyCfg(this.cfg);
};
/**
* Destroys action
*/
Action.prototype.destroy = function () {
// 移除 action
this.context.removeAction(this);
// 清空
this.context = null;
};
return Action;
}());
exports.default = Action;
//# sourceMappingURL=base.js.map