Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to preserve the initial style? #53

Closed
Fanyini opened this issue Apr 7, 2022 · 1 comment
Closed

How to preserve the initial style? #53

Fanyini opened this issue Apr 7, 2022 · 1 comment

Comments

@Fanyini
Copy link

Fanyini commented Apr 7, 2022

Dear all,
Firstly, thanks again for the nice work! I am also really grateful for support and implementing features based on requests from people!
Below is my code,I want the initial protein structure to be presented in the "molecular-surface" form. Next, other protein structures are added to manifest themselves in the form of "spacefills".But it will all be updated to the "spacefill" form (including the initial protein structure).
` new Promise((resolve => {
viewerInstance = new PDBeMolstarPlugin();
viewerContainer = document.getElementById("pdbView");

    // console.log(resolve)
    resolve()
})).then(() => {
    optionBall = {
        customData: {
            url: "http://127.0.0.1:5000/molStar/frameIndex", format: "pdb",
        }, visualStyle: "molecular-surface",
        hideControls: true,
    }
}).then(() => {
    viewerInstance.render(viewerContainer, optionBall)
}).then(() => {
    setTimeout(() => {
        viewerInstance.visual.update({
            customData: {
                url: "http://127.0.0.1:5000/molStar/pocketIndex",
                format: 'pdb',
            },
            visualStyle: "spacefill",
        }, false)
    }, 2000)
})`
@mandarsd
Copy link
Collaborator

This feature is now implemented / available in recent v3.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants