UNPKG

molstar

Version:

A comprehensive macromolecular library.

36 lines (35 loc) 1.66 kB
/** * Copyright (c) 2019-2021 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { __extends } from "tslib"; import { PluginBehavior } from '../../mol-plugin/behavior'; import { LoadCellPackModel } from './model'; import { CellPackGenerateColorThemeProvider } from './color/generate'; import { CellPackProvidedColorThemeProvider } from './color/provided'; export var CellPack = PluginBehavior.create({ name: 'cellpack', category: 'custom-props', display: { name: 'CellPack', description: 'CellPack Model Loading and Viewing.' }, ctor: /** @class */ (function (_super) { __extends(class_1, _super); function class_1() { return _super !== null && _super.apply(this, arguments) || this; } class_1.prototype.register = function () { this.ctx.state.data.actions.add(LoadCellPackModel); this.ctx.representation.structure.themes.colorThemeRegistry.add(CellPackGenerateColorThemeProvider); this.ctx.representation.structure.themes.colorThemeRegistry.add(CellPackProvidedColorThemeProvider); }; class_1.prototype.unregister = function () { this.ctx.state.data.actions.remove(LoadCellPackModel); this.ctx.representation.structure.themes.colorThemeRegistry.remove(CellPackGenerateColorThemeProvider); this.ctx.representation.structure.themes.colorThemeRegistry.remove(CellPackProvidedColorThemeProvider); }; return class_1; }(PluginBehavior.Handler)) });