-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Hello,
I have two mais routes in my Vue project:
- http://localhost:8080/
-http://localhost:8080/network
When i enter in the http://localhost:8080/network route for the first time, all the stuff I wourl like to do with my network, like add nodes and edgesm works fine. However, when I switch to the route http://localhost:8080/ and backs to the http://localhost:8080/networks, the component does not displays nodes addtions anymore.
preConfig(cytoscape) {
document.getElementById("cytoscape-div").style.minHeight='calc(100%)';
document.getElementById("cytoscape-div").style.maxHeight='calc(100%)';
if (!cytoscape("core", "cxtmenu")) {
cytoscape.use(cxmenu);
cytoscape.use(compoundDragAndDrop);
cytoscape.use(coseBilkent);
cytoscape.use(cise);
}
},
afterCreated(cy) {
cy.on("tap", "node", (e) => {
this.isExpandFormActive = true;
this.expandNode = e.target.data();
});
},
I suspect that maybe is a problem related to run preConfig and afterCreated everytime that I change the route. There is any solution to run these two methods only when the cytoscape component is created for the first time?
Metadata
Metadata
Assignees
Labels
No labels