You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
consteditornode=useTemplateRef('editornode')onMounted(()=>{if(!editornode.value){return;}constobserver=newMutationObserver((list,observer)=>{// @ts-expect-error target will be html elementfor(constnodeoflist.filter(i=>i.attributeName==='class'&&i.target?.classList.contains('baklava-node'))){// --dragging class will change on move, so we update graph on class changenextTick(()=>graph.value=baklava.editor.save().graph);}})observer.observe(editornode.value.$el.querySelector('.node-container'),{attributes: true,subtree: true})})
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:
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?
The text was updated successfully, but these errors were encountered: