cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
894
Views
5
Helpful
1
Replies

NeXt 'force' dataProcessor resets saved view

Suterusu1337
Level 1
Level 1

I found if I save a topology from NeXt using:

save = function() {
        localStorage.setItem('topology', JSON.stringify(topology.graph().getData()));
        
    };

Then I try and load the saved data:

    load = function() {
        topology.setData(JSON.parse(localStorage.getItem('topology')));
    };

if I am using the "force" dataProcessor:

dataProcessor: 'force'

Whenever I save -> load the topology, even with no changes made manually, the topology will always shift or reset.

 

Is there a way to load the topology without the data processor restructuring the data?

1 Reply 1

Suterusu1337
Level 1
Level 1

I added this and I think it is working:

    load = function() {
        topology.dataProcessor("")
        topology.data(JSON.parse(localStorage.getItem('topology')));
    };