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
416 stars 66 forks source link

Possible Error in constructors #171

Open parit opened 1 year ago

parit commented 1 year ago

Hello,

In Drawer.js there is line 47

this.svgDrawer.draw(data, svg, themeName, infoOnly, highlight_atoms);

where as In SvgDrawer.js line 31 expects a weights param:

draw(data, target, themeName = 'light', weights = null, infoOnly = false, highlight_atoms = [], weightsNormalized = false)

Can someone please check this on master branch? Seems like a bug to me. Thanks.

panda-byte commented 1 year ago

I am using smiles-drawer and this error affected me. As far as I can tell, it was introduced in f3693b3, where the weights parameter was added, but in Drawer.js the corresponding call wasn't updated.