-
|
Hi, Is there a way to add text above and below the reaction arrow when generating SVG in .Net and/or Javascript WASM, such as conditions, yields, reagents etc. ? We are trying to migrate to Indigo both our .Net backend and our react frontend, in order to generate SVG on the fly for molecules and reactions encoded in database as MolV3000 or RXNV3000 format. In database, we also have data about reagents and conditions that we must add to the exported SVG on top and below the arrow function in string format. Is there a way to do that ? As seen in #2609 , Ketcher seems to know how to handle this type of feature, but we cannot find a way to replicate that in Indigo.Net directly. Currently, we load and render our structure using the following code var indigoStructure = indigo.loadStructure(structure);
IndigoRenderer renderer = new IndigoRenderer(indigo);
/** redacted : setting options such as the output-format, render-image-size and render-coloring **/
//TODO : Add condition and yields
//TODO : Add highlight
var svg = renderer.renderToBuffer(indigoStructure);
return svg;Is there a way to add text lines in indigo, either on the structure itself after having it loaded, or when rendering to SVG ? And if there is a way in .Net, is there also a way in the WASM module ? Thank you for your incredible work, Indigo in WASM is really really good, it is so refreshing to have such performance on the client side ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The feature is supported only internally with: int BaseReaction::addSpecialCondition(int meta_idx, const Rect2f& bbox) in base_reaction.h/base_reaction.cpp. Indigo and ketcher communicate via ket-format which supports attaching of specific text to a reaction: https://github.com/epam/Indigo/blob/master/api/tests/integration/tests/formats/reactions/agents.ket We will expose the functionality in language bindings API in the future Indigo versions. |
Beta Was this translation helpful? Give feedback.
The feature is supported only internally with:
int BaseReaction::addSpecialCondition(int meta_idx, const Rect2f& bbox) in base_reaction.h/base_reaction.cpp.
Indigo and ketcher communicate via ket-format which supports attaching of specific text to a reaction:
https://github.com/epam/Indigo/blob/master/api/tests/integration/tests/formats/reactions/agents.ket
https://github.com/epam/Indigo/blob/master/api/tests/integration/tests/formats/reactions/special_condition.ket
We will expose the functionality in language bindings API in the future Indigo versions.