Closed robotoer closed 5 years ago
A simple way is to detect the viewer widget's load event, which will be invoked when a new or modified chem object has been reloaded in the viewer:
viewer.on('load', function(e){
console.log('Object modified', e.obj);
});
In the latest dist, event editingDone can also be used here (see commit ab6b6c6c1c69861d53dad147a1f04dd2189be1ae).
Perfect! Thanks a bunch @partridgejiang
Is there a callback or something that can trigger code after pressing the edit button on the viewer toolbar, making changes in the composer dialog, and pressing the 'OK' button?