partridgejiang / Kekule.js

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

Displaying movement of atoms molecules #200

Open aldol13 opened 3 years ago

aldol13 commented 3 years ago

Hi, I wanted to create an animation using kekule, by changing coordinates of molecules/atoms. My question is after updating the coordinates of an atom/node how do I update the viewer to display the changed coordinates?

partridgejiang commented 3 years ago

Hi @aldol13, you can call viewer.repaint() to update the display immediately, or call viewer.requestRepaint() to update it when the system is idle. Note the later method should be used with the latest dist.

aldol13 commented 3 years ago

Hi Patridge,

Apologies for the late reply

Thanks a lot. This works !