Skip to content

Commit 8f9ec83

Browse files
committed
molstar 4.9.0
1 parent c3c08f6 commit 8f9ec83

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"jquery-ui": "^1.12.1",
6363
"lodash": "^4.17.4",
6464
"ngl": "2.4.0",
65-
"molstar": "3.9.0",
65+
"molstar": "4.9.0",
6666
"underscore": "^1.8.3"
6767
},
6868
"devDependencies": {

js/src/molstarview/widget.ts

+12-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { PluginCommands } from 'molstar/lib/mol-plugin/commands';
88
import { PLUGIN_VERSION } from 'molstar/lib/mol-plugin/version';
99
import './light.css'; // npx sass node_modules/molstar/lib/mol-plugin-ui/skin/light.scss > light.css
1010
import * as representation from "./representation";
11+
import { renderReact18 } from "molstar/lib/mol-plugin-ui/react18";
1112

1213

1314
// import { basicSpec } from "./ui"
@@ -69,7 +70,16 @@ export class MolstarView extends widgets.DOMWidgetView {
6970

7071
async initializeDisplay() {
7172
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+
});
7383
this._focused = false;
7484
await this.checkLeaderView();
7585
}
@@ -312,4 +322,4 @@ export class MolstarView extends widgets.DOMWidgetView {
312322
module.exports = {
313323
'MolstarModel': MolstarModel,
314324
'MolstarView': MolstarView
315-
};
325+
};

notebooks/molstarview.ipynb

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{
1010
"data": {
1111
"application/vnd.jupyter.widget-view+json": {
12-
"model_id": "9ffbadcecf2c413aa0754e80c9b08b37",
12+
"model_id": "9b5586a7f3c243ceb16e803e97db27e5",
1313
"version_major": 2,
1414
"version_minor": 0
1515
},
@@ -21,7 +21,7 @@
2121
{
2222
"data": {
2323
"application/vnd.jupyter.widget-view+json": {
24-
"model_id": "1141c093551641e0b45f0b5f2383307d",
24+
"model_id": "b71b8c0bdd014221b67768790f63fdb1",
2525
"version_major": 2,
2626
"version_minor": 0
2727
},
@@ -62,7 +62,7 @@
6262
{
6363
"data": {
6464
"text/plain": [
65-
"'3.9.0'"
65+
"'4.9.0'"
6666
]
6767
},
6868
"execution_count": 3,
@@ -91,7 +91,7 @@
9191
{
9292
"data": {
9393
"application/vnd.jupyter.widget-view+json": {
94-
"model_id": "1141c093551641e0b45f0b5f2383307d",
94+
"model_id": "b71b8c0bdd014221b67768790f63fdb1",
9595
"version_major": 2,
9696
"version_minor": 0
9797
},
@@ -118,7 +118,7 @@
118118
},
119119
{
120120
"cell_type": "code",
121-
"execution_count": 25,
121+
"execution_count": 5,
122122
"id": "d3267052-054f-4d51-812d-e0012e8523c9",
123123
"metadata": {},
124124
"outputs": [],
@@ -128,7 +128,7 @@
128128
},
129129
{
130130
"cell_type": "code",
131-
"execution_count": 26,
131+
"execution_count": 6,
132132
"id": "5b5e6df6-a3c2-4e31-817e-cd8b4bd344b4",
133133
"metadata": {},
134134
"outputs": [],
@@ -138,7 +138,7 @@
138138
},
139139
{
140140
"cell_type": "code",
141-
"execution_count": 27,
141+
"execution_count": 7,
142142
"id": "9fbe9a38-d165-4636-ab2d-53dd3c83b035",
143143
"metadata": {},
144144
"outputs": [],
@@ -148,14 +148,14 @@
148148
},
149149
{
150150
"cell_type": "code",
151-
"execution_count": 28,
151+
"execution_count": 8,
152152
"id": "ebe3e41b-a4cd-4ffe-be1f-a2568fa62144",
153153
"metadata": {},
154154
"outputs": [
155155
{
156156
"data": {
157157
"application/vnd.jupyter.widget-view+json": {
158-
"model_id": "ff10e43f5a5a48a39f6486e0af7f0d54",
158+
"model_id": "df43027d622d48bf837514105f5876c1",
159159
"version_major": 2,
160160
"version_minor": 0
161161
},

0 commit comments

Comments
 (0)