Skip to content

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

@lifeart

Description

@lifeart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions