molstar
Version:
A comprehensive macromolecular library.
32 lines • 1.2 kB
JavaScript
/**
* Copyright (c) 2021 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author David Sehnal <david.sehnal@gmail.com>
*/
import { __extends } from "tslib";
import { PluginContext } from '../mol-plugin/context';
var PluginUIContext = /** @class */ (function (_super) {
__extends(PluginUIContext, _super);
function PluginUIContext(spec) {
var _this = _super.call(this, spec) || this;
_this.spec = spec;
_this.customParamEditors = new Map();
_this.initCustomParamEditors();
return _this;
}
PluginUIContext.prototype.initCustomParamEditors = function () {
if (!this.spec.customParamEditors)
return;
for (var _i = 0, _a = this.spec.customParamEditors; _i < _a.length; _i++) {
var _b = _a[_i], t = _b[0], e = _b[1];
this.customParamEditors.set(t.id, e);
}
};
PluginUIContext.prototype.dispose = function (options) {
_super.prototype.dispose.call(this, options);
this.layout.dispose();
};
return PluginUIContext;
}(PluginContext));
export { PluginUIContext };
//# sourceMappingURL=context.js.map