Skip to content
Snippets Groups Projects
Commit d9b32102 authored by AndiMajore's avatar AndiMajore
Browse files

fixing same Service issue

parent d3d1cb1b
No related branches found
No related tags found
No related merge requests found
......@@ -197,7 +197,14 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
public netex: NetexControllerService) {
this.showDetails = false;
this.analysis.subscribeList((items, selected) => {
this.analysis.subscribeList(async (items, selected) => {
// while (this.networkEl == null) {
// await setTimeout(() => {
// }, 200);
// }
// if (this.networkEl.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.id !== this.id)
// return;
// console.log("subcribe event on " + this.id)
// return if analysis panel is open or no nodes are loaded
if (this.selectedAnalysisToken || !this.nodeData.nodes) {
return;
......@@ -383,14 +390,15 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
}
public async createNetwork() {
if (this.networkEl == null) {
setTimeout(() => {
this.createNetwork();
}, 200);
return;
}
if (this.networkEl.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.id !== this.id)
return;
// if (this.networkEl == null) {
// setTimeout(() => {
// this.createNetwork();
// }, 200);
// return;
// }
// if (this.networkEl.nativeElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.parentElement.id !== this.id)
// return;
console.log("network "+this.id+" is set up!")
this.analysis.resetSelection();
this.selectedWrapper = null;
// getNetwork synchronizes the input network with the database
......@@ -419,6 +427,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
this.networkInternal = new vis.Network(container, this.nodeData, options);
this.networkInternal.on('doubleClick', (properties) => {
console.log("selected on node in "+this.id)
const nodeIds: Array<string> = properties.nodes;
if (nodeIds != null && nodeIds.length > 0) {
const nodeId = nodeIds[0];
......
......@@ -49,6 +49,13 @@
}'></network-expander>
</div>
<div >
<network-expander id="netexp2"
pluginId="2"
config='{}' network='{"nodes":[], "edges":[]}'></network-expander>
</div>
<br>
<br>
<br>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment