|
@@ -2,6 +2,7 @@
|
|
* Copyright (c) 2018-2023 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 David Sehnal <david.sehnal@gmail.com>
|
|
* @author David Sehnal <david.sehnal@gmail.com>
|
|
|
|
+ * @author Alexander Rose <alexander.rose@weirdbyte.de>
|
|
*/
|
|
*/
|
|
|
|
|
|
import { State, StateTransform, StateTransformer } from '../mol-state';
|
|
import { State, StateTransform, StateTransformer } from '../mol-state';
|
|
@@ -21,6 +22,7 @@ import { PluginContext } from './context';
|
|
import { PluginComponent } from '../mol-plugin-state/component';
|
|
import { PluginComponent } from '../mol-plugin-state/component';
|
|
import { PluginConfig } from './config';
|
|
import { PluginConfig } from './config';
|
|
import { StructureComponentManager } from '../mol-plugin-state/manager/structure/component';
|
|
import { StructureComponentManager } from '../mol-plugin-state/manager/structure/component';
|
|
|
|
+import { StructureSelectionSnapshot } from '../mol-plugin-state/manager/structure/selection';
|
|
|
|
|
|
export { PluginState };
|
|
export { PluginState };
|
|
|
|
|
|
@@ -65,6 +67,7 @@ class PluginState extends PluginComponent {
|
|
canvas3d: p.canvas3d ? { props: this.plugin.canvas3d?.props } : void 0,
|
|
canvas3d: p.canvas3d ? { props: this.plugin.canvas3d?.props } : void 0,
|
|
interactivity: p.interactivity ? { props: this.plugin.managers.interactivity.props } : void 0,
|
|
interactivity: p.interactivity ? { props: this.plugin.managers.interactivity.props } : void 0,
|
|
structureFocus: this.plugin.managers.structure.focus.getSnapshot(),
|
|
structureFocus: this.plugin.managers.structure.focus.getSnapshot(),
|
|
|
|
+ structureSelection: p.structureSelection ? this.plugin.managers.structure.selection.getSnapshot() : void 0,
|
|
structureComponentManager: p.componentManager ? {
|
|
structureComponentManager: p.componentManager ? {
|
|
options: this.plugin.managers.structure.component.state.options
|
|
options: this.plugin.managers.structure.component.state.options
|
|
} : void 0,
|
|
} : void 0,
|
|
@@ -89,6 +92,9 @@ class PluginState extends PluginComponent {
|
|
if (snapshot.structureFocus) {
|
|
if (snapshot.structureFocus) {
|
|
this.plugin.managers.structure.focus.setSnapshot(snapshot.structureFocus);
|
|
this.plugin.managers.structure.focus.setSnapshot(snapshot.structureFocus);
|
|
}
|
|
}
|
|
|
|
+ if (snapshot.structureSelection) {
|
|
|
|
+ this.plugin.managers.structure.selection.setSnapshot(snapshot.structureSelection);
|
|
|
|
+ }
|
|
if (snapshot.animation) {
|
|
if (snapshot.animation) {
|
|
this.animation.setSnapshot(snapshot.animation);
|
|
this.animation.setSnapshot(snapshot.animation);
|
|
}
|
|
}
|
|
@@ -146,6 +152,7 @@ namespace PluginState {
|
|
durationInMs: PD.Numeric(1500, { min: 100, max: 15000, step: 100 }, { label: 'Duration in ms' }),
|
|
durationInMs: PD.Numeric(1500, { min: 100, max: 15000, step: 100 }, { label: 'Duration in ms' }),
|
|
data: PD.Boolean(true),
|
|
data: PD.Boolean(true),
|
|
behavior: PD.Boolean(false),
|
|
behavior: PD.Boolean(false),
|
|
|
|
+ structureSelection: PD.Boolean(false),
|
|
componentManager: PD.Boolean(true),
|
|
componentManager: PD.Boolean(true),
|
|
animation: PD.Boolean(true),
|
|
animation: PD.Boolean(true),
|
|
startAnimation: PD.Boolean(false),
|
|
startAnimation: PD.Boolean(false),
|
|
@@ -181,6 +188,7 @@ namespace PluginState {
|
|
props?: InteractivityManager.Props
|
|
props?: InteractivityManager.Props
|
|
},
|
|
},
|
|
structureFocus?: StructureFocusSnapshot,
|
|
structureFocus?: StructureFocusSnapshot,
|
|
|
|
+ structureSelection?: StructureSelectionSnapshot,
|
|
structureComponentManager?: {
|
|
structureComponentManager?: {
|
|
options?: StructureComponentManager.Options
|
|
options?: StructureComponentManager.Options
|
|
},
|
|
},
|