Code Monkey home page Code Monkey logo

Comments (6)

mandarsd avatar mandarsd commented on August 15, 2024

Hi Laurent,

You can use the 'SelectExtractFocus' helper function to accomplish this. Here is a demo for your reference - https://embed.plnkr.co/c5K23wAX0TWexmIsLOVm/

Cheers,
Mandar

from pdb-lite-mol.

ens-lgil avatar ens-lgil commented on August 15, 2024

from pdb-lite-mol.

ens-lgil avatar ens-lgil commented on August 15, 2024

Hi Mandar,

Sorry, just a follow up question regarding the multiple selection: is it possible to colour the different elements selected on differents colours ?
e.g.:

  • selection 1: residues 10 to 15 highlighted in blue
  • selection 2: residues 22 to 24 highlighted in red
  • selection 3: residue 35 highlighted in yellow
    ... and so on

This could be useful to differentiate the selected elements without having to move the mouse over them.

Cheers,
Laurent

from pdb-lite-mol.

mandarsd avatar mandarsd commented on August 15, 2024

Hi Laurent,

To accomplish this you'll have to do custom themes implementation. Currently you have to use some LiteMol core commands/methods for which we don't have any helper function in the component.

Here is the working demo - https://embed.plnkr.co/HmclfeEXY2diUEf6mQqA/

You can refer to LiteMol core documentation to check all the advance implementations you can do using the core library functions.
https://github.com/dsehnal/LiteMol/tree/master/examples
https://github.com/dsehnal/LiteMol/tree/master/examples/Commands
https://webchemdev.ncbr.muni.cz/LiteMol/Examples/Commands/

I have added the litemol-custom-theme.js script snippet in the demo from the commands example.

Hope this helps!

Cheers,
Mandar

from pdb-lite-mol.

ens-lgil avatar ens-lgil commented on August 15, 2024

Hi Mandar,

Thank you very much for the demo! I added it to my test and it worked!

Cheers,
Laurent

from pdb-lite-mol.

mandarsd avatar mandarsd commented on August 15, 2024

Excellent! I'll close this issue then.

Cheers,
Mandar

from pdb-lite-mol.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.