reymond-group / smilesDrawer

A small, highly performant JavaScript component for parsing and drawing SMILES strings. Released under the MIT license.
https://smilesdrawer.rocks
MIT License
434 stars 68 forks source link

fixed issue #105 by adding rings and improved svg handling #115

Closed Melclic closed 2 years ago

Melclic commented 3 years ago

Fixed issue #105 by creating a new function to draw rings. The issue is that the drawAromaticityRing function for the SvgDrawer used the canvas context and not SVG elements. Updated that function and created a createRing() function in SvgWrapper to draw the aromatic ring that the original function was referring to.

Also fixed bug that occurred when drawing multiple molecules on the same document. Did it by creating random string for individual drawing of molecule "#".

Finally added the ability to pass svg HTMLElement object to the SvgDraw function and not just a string

swamidass commented 2 years ago

Is this going to be merged?

Melclic commented 2 years ago

Is this going to be merged?

It looks like the author isn't maintaining the project unfortunately. I don't have enough JS experience to take up the project unfortunately.... But I would be interested in contributing whoever does

swamidass commented 2 years ago

I'm an academic. I'll send him a note and see if he responds.

daenuprobst commented 2 years ago

Hey guys, sorry for being away from SmilesDrawer for a while. I'm currently going through everything and will also add reaction depiction. I merged it now and will release a 2.0 soon (when I got the reactions done)

Melclic commented 2 years ago

Great! Happy that you are back. Such a cool project!