partridgejiang / Kekule.js

A Javascript cheminformatics toolkit.
http://partridgejiang.github.io/Kekule.js
MIT License
248 stars 61 forks source link

Is periodic table customizable in composer? #183

Closed rustamzh closed 4 years ago

rustamzh commented 4 years ago

Is it possible to select elements that will be shown in periodic table of the Atom tool? I think it is possible with CSS but is there JS way?

partridgejiang commented 4 years ago

Do you mean the atom panel or the periodic table invoked by the "..." button of the atom panel? For the former, displayed element buttons can be customized by:

composer.getEditorConfigs().getStructureConfigs().setPrimaryOrgChemAtoms(['C', 'H', 'N', 'S']);

And for the latter, since the hidden of some elements may cause a odd outlook of periodic table, so it is not customizable currently.

rustamzh commented 4 years ago

Thank you! It is what I needed