Skip to content
Snippets Groups Projects
Commit 55f4abb6 authored by Alexander Rose's avatar Alexander Rose
Browse files

add repr/theme registry .clear method

parent 2e013faf
No related branches found
No related tags found
No related merge requests found
/**
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
* Copyright (c) 2018-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
......@@ -135,6 +135,12 @@ export class RepresentationRegistry<D, S extends Representation.State> {
getApplicableTypes(data: D) {
return getTypes(this.getApplicableList(data));
}
clear() {
this._list.length = 0;
this._map.clear();
this._name.clear();
}
}
//
......
......@@ -41,7 +41,7 @@ export namespace StructureRepresentationRegistry {
'carbohydrate': CarbohydrateRepresentationProvider,
'ellipsoid': EllipsoidRepresentationProvider,
'gaussian-surface': GaussianSurfaceRepresentationProvider,
'gaussian-volume': GaussianVolumeRepresentationProvider, // TODO disabled for now, needs more work
'gaussian-volume': GaussianVolumeRepresentationProvider,
'label': LabelRepresentationProvider,
'line': LineRepresentationProvider,
'molecular-surface': MolecularSurfaceRepresentationProvider,
......
/**
* Copyright (c) 2018-2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
* Copyright (c) 2018-2023 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
......@@ -156,4 +156,10 @@ export class ThemeRegistry<T extends ColorTheme<any, any> | SizeTheme<any>> {
getApplicableTypes(ctx: ThemeDataContext) {
return getTypes(this.getApplicableList(ctx));
}
clear() {
this._list.length = 0;
this._map.clear();
this._name.clear();
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment