Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
  • Loading branch information
hainm committed Dec 4, 2024
1 parent c401e77 commit 0bc5d2b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
11 changes: 4 additions & 7 deletions js/src/molstarview/representation.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import { Dict } from "@jupyter-widgets/base"
import { StructureRef } from "molstar/lib/mol-plugin-state/manager/structure/hierarchy-state"
import { PluginUIContext } from "molstar/lib/mol-plugin-ui/context"

export
function addRepresentation(plugin: PluginUIContext, params, strucIndex){
var st: StructureRef = plugin.managers.structure.hierarchy.current.structures[strucIndex]
console.log("Calling from addRepresentation", st, params, strucIndex)
function addRepresentation(plugin, params, modelIndex){
var st = plugin.managers.structure.hierarchy.current.structures[modelIndex]
console.log("Calling from addRepresentation", st, params, modelIndex)
var components = st.components
plugin.dataTransaction(async () => {
for (const component of components) {
Expand All @@ -19,6 +16,6 @@ export
function removeRepresentation(){
}

export
export
function clearRepresentation(){
}
5 changes: 2 additions & 3 deletions js/src/molstarview/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { PLUGIN_VERSION } from 'molstar/lib/mol-plugin/version';
import './light.css'; // npx sass node_modules/molstar/lib/mol-plugin-ui/skin/light.scss > light.css
import * as representation from "./representation";
import { renderReact18 } from "molstar/lib/mol-plugin-ui/react18";
import { PluginUIContext } from 'molstar/lib/mol-plugin-ui/context';


// import { basicSpec } from "./ui"
Expand Down Expand Up @@ -48,8 +47,8 @@ export class MolstarModel extends widgets.DOMWidgetModel {

// Custom View. Renders the widget model.
export class MolstarView extends widgets.DOMWidgetView {
plugin: PluginUIContext;
container: HTMLDivElement;
plugin: any;
container: any;
isLeader: boolean;
_focused: boolean;
_synced_model_ids: any;
Expand Down

0 comments on commit 0bc5d2b

Please sign in to comment.