Commit 8f9ec83 1 parent c3c08f6 commit 8f9ec83 Copy full SHA for 8f9ec83
File tree 3 files changed +22
-12
lines changed
3 files changed +22
-12
lines changed Original file line number Diff line number Diff line change 62
62
"jquery-ui" : " ^1.12.1" ,
63
63
"lodash" : " ^4.17.4" ,
64
64
"ngl" : " 2.4.0" ,
65
- "molstar" : " 3 .9.0" ,
65
+ "molstar" : " 4 .9.0" ,
66
66
"underscore" : " ^1.8.3"
67
67
},
68
68
"devDependencies" : {
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import { PluginCommands } from 'molstar/lib/mol-plugin/commands';
8
8
import { PLUGIN_VERSION } from 'molstar/lib/mol-plugin/version' ;
9
9
import './light.css' ; // npx sass node_modules/molstar/lib/mol-plugin-ui/skin/light.scss > light.css
10
10
import * as representation from "./representation" ;
11
+ import { renderReact18 } from "molstar/lib/mol-plugin-ui/react18" ;
11
12
12
13
13
14
// import { basicSpec } from "./ui"
@@ -69,7 +70,16 @@ export class MolstarView extends widgets.DOMWidgetView {
69
70
70
71
async initializeDisplay ( ) {
71
72
this . setupContainer ( ) ;
72
- this . plugin = await createPluginUI ( this . container ) ;
73
+ this . plugin = await createPluginUI ( {
74
+ target : this . container ,
75
+ render : ( component , container ) => {
76
+ renderReact18 ( component , container ) ;
77
+ } ,
78
+ spec : undefined , // or provide a PluginUISpec object if needed
79
+ onBeforeUIRender : async ( ctx ) => {
80
+ // Implement the onBeforeUIRender logic here
81
+ }
82
+ } ) ;
73
83
this . _focused = false ;
74
84
await this . checkLeaderView ( ) ;
75
85
}
@@ -312,4 +322,4 @@ export class MolstarView extends widgets.DOMWidgetView {
312
322
module . exports = {
313
323
'MolstarModel' : MolstarModel ,
314
324
'MolstarView' : MolstarView
315
- } ;
325
+ } ;
Original file line number Diff line number Diff line change 9
9
{
10
10
"data" : {
11
11
"application/vnd.jupyter.widget-view+json" : {
12
- "model_id" : " 9ffbadcecf2c413aa0754e80c9b08b37 " ,
12
+ "model_id" : " 9b5586a7f3c243ceb16e803e97db27e5 " ,
13
13
"version_major" : 2 ,
14
14
"version_minor" : 0
15
15
},
21
21
{
22
22
"data" : {
23
23
"application/vnd.jupyter.widget-view+json" : {
24
- "model_id" : " 1141c093551641e0b45f0b5f2383307d " ,
24
+ "model_id" : " b71b8c0bdd014221b67768790f63fdb1 " ,
25
25
"version_major" : 2 ,
26
26
"version_minor" : 0
27
27
},
62
62
{
63
63
"data" : {
64
64
"text/plain" : [
65
- " '3 .9.0'"
65
+ " '4 .9.0'"
66
66
]
67
67
},
68
68
"execution_count" : 3 ,
91
91
{
92
92
"data" : {
93
93
"application/vnd.jupyter.widget-view+json" : {
94
- "model_id" : " 1141c093551641e0b45f0b5f2383307d " ,
94
+ "model_id" : " b71b8c0bdd014221b67768790f63fdb1 " ,
95
95
"version_major" : 2 ,
96
96
"version_minor" : 0
97
97
},
118
118
},
119
119
{
120
120
"cell_type" : " code" ,
121
- "execution_count" : 25 ,
121
+ "execution_count" : 5 ,
122
122
"id" : " d3267052-054f-4d51-812d-e0012e8523c9" ,
123
123
"metadata" : {},
124
124
"outputs" : [],
128
128
},
129
129
{
130
130
"cell_type" : " code" ,
131
- "execution_count" : 26 ,
131
+ "execution_count" : 6 ,
132
132
"id" : " 5b5e6df6-a3c2-4e31-817e-cd8b4bd344b4" ,
133
133
"metadata" : {},
134
134
"outputs" : [],
138
138
},
139
139
{
140
140
"cell_type" : " code" ,
141
- "execution_count" : 27 ,
141
+ "execution_count" : 7 ,
142
142
"id" : " 9fbe9a38-d165-4636-ab2d-53dd3c83b035" ,
143
143
"metadata" : {},
144
144
"outputs" : [],
148
148
},
149
149
{
150
150
"cell_type" : " code" ,
151
- "execution_count" : 28 ,
151
+ "execution_count" : 8 ,
152
152
"id" : " ebe3e41b-a4cd-4ffe-be1f-a2568fa62144" ,
153
153
"metadata" : {},
154
154
"outputs" : [
155
155
{
156
156
"data" : {
157
157
"application/vnd.jupyter.widget-view+json" : {
158
- "model_id" : " ff10e43f5a5a48a39f6486e0af7f0d54 " ,
158
+ "model_id" : " df43027d622d48bf837514105f5876c1 " ,
159
159
"version_major" : 2 ,
160
160
"version_minor" : 0
161
161
},
You can’t perform that action at this time.
0 commit comments