Skip to content

Adjust subscription to library update event of Ketcher API #8281

@svvald

Description

@svvald

Background
Currently when subscribed to library update event (libraryUpdate) using Ketcher API, when a new monomer is added, the whole library is pushed to the subscribers as per original requirements (#6552). However, it makes it quite hard to distinguish the monomers that have been added/updated.

Solution
Change libraryUpdate event subscription so it only pushes the actual update to the library in sdf format.
Event subscription should work using existing subscribe method.
Add documentation similar to change event.

Example

ketcher.editor.subscribe('libraryUpdate', (eventData) => {
    console.log('Created monomer in sdf:', eventData);
});

Metadata

Metadata

Labels

Test Cases WrittenTest cases has been written for that issue

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions