molstar
Version:
A comprehensive macromolecular library.
42 lines • 1.96 kB
JavaScript
/**
* Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.SecondaryStructure = void 0;
var tslib_1 = require("tslib");
var behavior_1 = require("../../../behavior");
var param_definition_1 = require("../../../../../mol-util/param-definition");
var secondary_structure_1 = require("../../../../../mol-model-props/computed/secondary-structure");
exports.SecondaryStructure = behavior_1.PluginBehavior.create({
name: 'computed-secondary-structure-prop',
category: 'custom-props',
display: { name: 'Secondary Structure' },
ctor: /** @class */ (function (_super) {
(0, tslib_1.__extends)(class_1, _super);
function class_1() {
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.provider = secondary_structure_1.SecondaryStructureProvider;
return _this;
}
class_1.prototype.update = function (p) {
var updated = (this.params.autoAttach !== p.autoAttach);
this.params.autoAttach = p.autoAttach;
this.ctx.customStructureProperties.setDefaultAutoAttach(this.provider.descriptor.name, this.params.autoAttach);
return updated;
};
class_1.prototype.register = function () {
this.ctx.customStructureProperties.register(this.provider, this.params.autoAttach);
};
class_1.prototype.unregister = function () {
this.ctx.customStructureProperties.unregister(this.provider.descriptor.name);
};
return class_1;
}(behavior_1.PluginBehavior.Handler)),
params: function () { return ({
autoAttach: param_definition_1.ParamDefinition.Boolean(false)
}); }
});
//# sourceMappingURL=secondary-structure.js.map
;