Skip to content

Commit

Permalink
fix expanded toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Jhsmit committed Nov 19, 2024
1 parent 7e77001 commit 3dd3d07
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ipymolstar/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ function render({ model, el }) {
// Make the container responsive
viewerContainer.style.maxWidth = "100%";
viewerContainer.style.boxSizing = "border-box";

var viewerInstance = new window.PDBeMolstarPlugin();
viewerInstance.render(viewerContainer, getOptions(model)); //.then(() => {
el.appendChild(viewerContainer);
Expand Down Expand Up @@ -201,9 +202,9 @@ function render({ model, el }) {
"change:visual_style": () => {
viewerInstance.visual.update(getOptions(model), true);
},
// "change:lighting": () => {
// viewerInstance.visual.update(getOptions(model), true);
// },
"change:expanded": () => {
viewerInstance.canvas.toggleExpanded(model.get("expanded"));
},
"change:bg_color": () => {
viewerInstance.canvas.setBgColor(toRgb(model.get("bg_color")));
},
Expand Down

0 comments on commit 3dd3d07

Please sign in to comment.