|
@@ -162,12 +162,6 @@ export class Viewer {
|
|
|
this.plugin.init();
|
|
|
ReactDOM.render(React.createElement(Plugin, { plugin: this.plugin }), target);
|
|
|
|
|
|
- const renderer = this.plugin.canvas3d!.props.renderer;
|
|
|
- PluginCommands.Canvas3D.SetSettings(this.plugin, { settings: { renderer: { ...renderer, backgroundColor: o.backgroundColor } } });
|
|
|
-
|
|
|
- this.plugin.representation.structure.themes.colorThemeRegistry.add(SuperposeColorThemeProvider);
|
|
|
- // this.plugin.builders.structure.representation.registerPreset(RcsbSuperpositionRepresentationPreset);
|
|
|
-
|
|
|
// TODO Check why this.plugin.canvas3d can be null
|
|
|
// this.plugin.canvas3d can be null. The value is not assigned until React Plugin component is mounted
|
|
|
// Next wait Promise guarantees that its value is defined
|
|
@@ -186,6 +180,8 @@ export class Viewer {
|
|
|
wait.then(result=>{
|
|
|
const renderer = this.plugin.canvas3d!.props.renderer;
|
|
|
PluginCommands.Canvas3D.SetSettings(this.plugin, { settings: { renderer: { ...renderer, backgroundColor: o.backgroundColor } } });
|
|
|
+ this.plugin.representation.structure.themes.colorThemeRegistry.add(SuperposeColorThemeProvider);
|
|
|
+ // this.plugin.builders.structure.representation.registerPreset(RcsbSuperpositionRepresentationPreset);
|
|
|
});
|
|
|
if (o.showWelcomeToast) {
|
|
|
PluginCommands.Toast.Show(this.plugin, {
|