diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts index fa89131232ceecca33da994cf3a5e253c4b5ec82..9875145521bce3771192d8f456a426e72442e28e 100644 --- a/src/app/pages/explorer-page/explorer-page.component.ts +++ b/src/app/pages/explorer-page/explorer-page.component.ts @@ -471,9 +471,10 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { */ public setConfigNodeGroup(key: string, nodeGroups: { [key: string]: NodeGroup } | {}) { // make sure that return-groups (seeds, drugs, found nodes) are set - // const defaultNodeGroups = JSON.parse(JSON.stringify(defaultConfig.nodeGroups)); + const defaultNodeGroups = JSON.parse(JSON.stringify(defaultConfig.nodeGroups)); // user merge function to do deep merge - // nodeGroups = merge(defaultNodeGroups, nodeGroups); + nodeGroups = merge(defaultNodeGroups, nodeGroups); + // make sure all keys are set Object.entries(nodeGroups).forEach(([key, group]) => { @@ -533,8 +534,8 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { */ public setConfigEdgeGroup(key: string, edgeGroups: { [key: string]: EdgeGroup }) { // make sure that default-groups are set - // const defaultNodeGroups = JSON.parse(JSON.stringify(defaultConfig.edgeGroups)); - // edgeGroups = merge(defaultNodeGroups, edgeGroups); + const defaultNodeGroups = JSON.parse(JSON.stringify(defaultConfig.edgeGroups)); + edgeGroups = merge(defaultNodeGroups, edgeGroups); // // do not allow '_' in node Group names since it causes problems with backend // edgeGroups = removeUnderscoreFromKeys(edgeGroups) diff --git a/src/index.html b/src/index.html index 0bd2c9cbd6e8a1490d030c9955430f7386f63537..f694e15ae52afd489495f662ba092283137e3cd8 100644 --- a/src/index.html +++ b/src/index.html @@ -118,7 +118,7 @@ Export As Graphml Button<br> <drugst-one id="netexp1" pluginId="2" - groups='{}' + groups='{"nodeGroups":{}}' config='{"identifier":"entrez","title":"Breast cancer example network","nodeShadow":true,"edgeShadow":false,"autofillEdges":true,"interactionProteinProtein":"STRING","licensedDatasets":true,"selfReferences":false}' network='{"nodes":[{"id":"7040","label":"7040"}]}'> </drugst-one>