diff --git a/src/app/components/network/network.component.ts b/src/app/components/network/network.component.ts index 0ff031ad93a701a37cfcaa4283a5310ef9e1a1e5..6a821c43cca942f361062a4731d262695a333f74 100644 --- a/src/app/components/network/network.component.ts +++ b/src/app/components/network/network.component.ts @@ -305,14 +305,12 @@ export class NetworkComponent implements OnInit { public stabilize(): Promise<any> { return new Promise<boolean>((resolve, reject) => { - this.networkInternal.once('stabilizationIterationsDone', () => { + this.networkInternal.on('stabilizationIterationsDone', () => { this.updatePhysicsEnabled(this.drugstoneConfig.config.physicsOn); this.networkInternal.fit(); this.loadingScreen.stateUpdate(false); - console.log('Stabilization end: ' + Date.now()); resolve(true); }); - console.log('Stabilization start: ' + Date.now()); this.loadingScreen.stateUpdate(true); this.networkInternal.stabilize(1000); }); diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts index e28cb8eb90c29ba6a07291d0c6e0e61f583a07c9..0f3240e0f572332f741c1faaa45b1bb521a85f61 100644 --- a/src/app/pages/explorer-page/explorer-page.component.ts +++ b/src/app/pages/explorer-page/explorer-page.component.ts @@ -364,7 +364,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { this.networkHandler.activeNetwork.networkInternal = new vis.Network(container, this.nodeData, options); - this.networkHandler.activeNetwork.networkInternal.once('stabilizationIterationsDone', () => { + this.networkHandler.activeNetwork.networkInternal.on('stabilizationIterationsDone', () => { if (!this.drugstoneConfig.config.physicsOn) { this.networkHandler.activeNetwork.updatePhysicsEnabled(false); } diff --git a/src/index.html b/src/index.html index f31c6ca9e260709dd7dc99d238721495c0c22672..ab11442c035db232115aa27597e9970df23c5bfb 100644 --- a/src/index.html +++ b/src/index.html @@ -114,8 +114,37 @@ menu<br> <drugst-one id="netexp1" config='{"activateNetworkMenuButtonAdjacentDisorders":false,"activateNetworkMenuButtonAdjacentDrugs":false, "activateNetworkMenuButtonAdjacentDisordersDrugs": false, "licensedDatasets":true}' - groups='{"nodeGroups":{"important":{"type":"gene","color":"#ff881f","font":{"color":"#000000"},"groupName":"Important Gene","shape":"star"},"gene":{"type":"gene","color":"#4da300","font":{"color":"#f0f0f0"},"groupName":"Gene","shape":"circle"},"foundDrug":{"type":"drug","color":"#F12590","font":{"color":"#000000"},"groupName":"Drug","shape":"diamond"}},"edgeGroups":{"default":{"color":"#000000","groupName":"default edge"}}}' - network='{"nodes":[{"id":"ATG16L1","group":"gene","label":"ATG16L1"},{"id":"HETZ","group":"gene","label":"HETZ234234234"}]}'> + groups='{"nodeGroups":{"protein":{"type":"protein","color":"#4da300","font":{"color":"#f0f0f0"},"groupName":"Protein","shape":"circle"},"foundDrug":{"type":"drug","color":"#F12590","font":{"color":"#000000"},"groupName":"Drug","shape":"diamond"}},"edgeGroups":{"default":{"color":"#000000","groupName":"default edge"}}}' + network='{"nodes":[{ "id": "ATG16L1", "group": "protein", "label": "ATG16L1" }, + { "id": "ICAM1", "group": "protein", "label": "ICAM1" }, + { "id": "TNF", "group": "protein", "label": "TNF" }, + { "id": "SFRP2", "group": "protein", "label": "SFRP2" }, + { "id": "APC2", "group": "protein", "label": "APC2" }, + { "id": "IL10", "group": "protein", "label": "IL10" }, + { "id": "CUL2", "group": "protein", "label": "CUL2" }, + { "id": "SFRP1", "group": "protein", "label": "SFRP1" }, + { "id": "TNFSF15", "group": "protein", "label": "TNFSF15" }, + { "id": "ITGA4", "group": "protein", "label": "ITGA4" }, + { "id": "DEFA5", "group": "protein", "label": "DEFA5" }, + { "id": "MUC19", "group": "protein", "label": "MUC19" }, + { "id": "SLAMF8", "group": "protein", "label": "SLAMF8" }, + { "id": "APC", "group": "protein", "label": "APC" }, + { "id": "IL6", "group": "protein", "label": "IL6" }, + { "id": "INAVA", "group": "protein", "label": "INAVA" }, + { "id": "CARD9", "group": "protein", "label": "CARD9" }, + { "id": "ITGB8", "group": "protein", "label": "ITGB8" }, + { "id": "IL23R", "group": "protein", "label": "IL23R" }, + { "id": "NOD2", "group": "protein", "label": "NOD2" }, + { "id": "RASSF1", "group": "protein", "label": "RASSF1" }, + { "id": "SLC11A1", "group": "protein", "label": "SLC11A1" }, + { "id": "IL18RAP", "group": "protein", "label": "IL18RAP" }, + { "id": "TGFB1", "group": "protein", "label": "TGFB1" }, + { "id": "IRGM", "group": "protein", "label": "IRGM" }, + { "id": "PLCG2", "group": "protein", "label": "PLCG2" }, + { "id": "PTPN22", "group": "protein", "label": "PTPN22" }, + { "id": "PTGS2", "group": "protein", "label": "PTGS2" }, + { "id": "VNN1", "group": "protein", "label": "VNN1" }, + { "id": "ITGAL", "group": "protein", "label": "ITGAL" }]}'> </drugst-one> <!-- <drugst-one id="netexp1"-->