UNPKG

1.24 kBJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Base = void 0;
4var Base = /** @class */ (function () {
5 function Base() {
6 this.nodes = [];
7 this.edges = [];
8 this.combos = [];
9 this.positions = [];
10 this.destroyed = false;
11 }
12 Base.prototype.layout = function (data) {
13 this.init(data);
14 return this.execute(true);
15 };
16 Base.prototype.init = function (data) {
17 this.nodes = data.nodes || [];
18 this.edges = data.edges || [];
19 this.combos = data.combos || [];
20 };
21 Base.prototype.execute = function (reloadData) { };
22 Base.prototype.executeWithWorker = function () { };
23 Base.prototype.getDefaultCfg = function () {
24 return {};
25 };
26 Base.prototype.updateCfg = function (cfg) {
27 if (cfg) {
28 Object.assign(this, cfg);
29 }
30 };
31 Base.prototype.getType = function () {
32 return 'base';
33 };
34 Base.prototype.destroy = function () {
35 this.nodes = null;
36 this.edges = null;
37 this.combos = null;
38 this.positions = null;
39 this.destroyed = true;
40 };
41 return Base;
42}());
43exports.Base = Base;
44//# sourceMappingURL=base.js.map
\No newline at end of file