Skip to content

Node position change event? #438

@terion-name

Description

@terion-name

I'm trying to make graph to be saved in any time to localstorage to not loose changes after page reload.
For this I need to watch all changes and sync.
Currently this tracks most of the changes AFAIK:

const updaterToken = Symbol();
for (const prop of ['addNode', 'removeNode', 'addConnection', 'removeConnection']) {
  baklava.editor.graphEvents[prop].subscribe(updaterToken, () => graph.value = baklava.editor.save());
}
for (const prop of ['update', 'addInput', 'loaded', 'addOutput', 'removeInput', 'removeOutput', 'titleChanged']) {
  baklava.editor.nodeEvents[prop].subscribe(updaterToken, () => graph.value = baklava.editor.save());
}

But as far as I can see there is no way to catch node movement.

Am I missing something? If not, can this be added?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions