Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to update annotations from state object (onStateChanged) - emitStateChangeEvent #71

Open
lifeart opened this issue May 16, 2020 · 2 comments

Comments

@lifeart
Copy link

lifeart commented May 16, 2020

We have listener

// onStateChanged: Fired when plugin state has changed (annotation added, removed, etc)
// This is a way to watch global plugin state, as an alternative to watching various annotation events

plugin.registerListener('onStateChanged', (event) => {
// event.detail = annotation state data
});

Currently there is no alternatives for this event in emitters api, it may be tricky to roll updated state using atomic operations. And it will be great to allow full rerender just passing new state data into some event emitter.

@iamshouvikmitra
Copy link

Any luck figuring this out @lifeart ? Even I want to re-initialize the plugin with new data when a new comment/annotation is received from the backend api.

@lifeart
Copy link
Author

lifeart commented Sep 12, 2021

Hi @iamshouvikmitra nope (

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants