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

Impossible to specify target for svgDrawer as element #127

Closed eizemazal closed 2 years ago

eizemazal commented 2 years ago

I am developing a Vue.js wrapper for smilesDrawer. It is not always possible to get element ids in reactive frameworks, at least in Vue, but it is possible to get true HTML element.

smilesDrawer allows to specify target either by id, or by passing an element as target, although this does not seem to be documented. But svgDrawer only accepts string as an element id.

I think this should be fixed to facilitate integration of smilesDrawer into reactive apps.

swamidass commented 2 years ago

This should be fixed now.