partridgejiang / Kekule.js

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

[RESOLVED] Strange ring behavior when disabling operation history #131

Closed antonintlh closed 5 years ago

antonintlh commented 5 years ago

Hello!

I found a strange behavior on rings when disabling operation history.

I use setEnableOperHistory(false).

const composer = new Kekule.Editor.Composer(document);
composer.setEnableOperHistory(false);

When I draw a molecule with two or more rings (with rings buttons, not drawing them with bonds), Molecule with 2 benzene

it gives me that strange smiles : c1cc(C)ccc1 (seems that only the first ring drawn is taken in account)

But when I comment out setEnableOperHistory(false), it gives me the correct smiles export: c1ccc(cc1)-c2ccccc2


Some notes :

Thank you in advance for your help!

Antonin

partridgejiang commented 5 years ago

Thanks a lot for the feedback, and sorry for he delay of replying. Anyway, the bug has been fixed now, please check the latest dist files, :).

antonintlh commented 5 years ago

Thank you for your help!