diff --git a/src/app/components/license-agreement/license-agreement.component.scss b/src/app/components/license-agreement/license-agreement.component.scss index 9e45929b626f77e8f4b32936353a8a7694c98011..6261473324832eeeef0e9683279bec0995aa918f 100644 --- a/src/app/components/license-agreement/license-agreement.component.scss +++ b/src/app/components/license-agreement/license-agreement.component.scss @@ -5,3 +5,10 @@ .is-text-align-justify { text-align: justify } + +.modal-card { + border-top-left-radius: 6px; + border-top-right-radius: 6px; + border-bottom-left-radius: 6px; + border-bottom-right-radius: 6px; +} diff --git a/src/app/components/privacy-banner/privacy-banner.component.scss b/src/app/components/privacy-banner/privacy-banner.component.scss index 808cb86b3d854c6583954cf70d346c538c5440e5..83a2fe4bebbf2751da9973ddf9d7cd7b52baac65 100644 --- a/src/app/components/privacy-banner/privacy-banner.component.scss +++ b/src/app/components/privacy-banner/privacy-banner.component.scss @@ -5,6 +5,8 @@ bottom: 0; z-index: $privacy-banner-z; width: 100%; + padding-left: 0; + padding-right: 0; &.disabled { display: none; } diff --git a/src/app/pages/explorer-page/explorer-page.component.ts b/src/app/pages/explorer-page/explorer-page.component.ts index ca3619540f767d919ff42d6a805e861476a33204..fa89131232ceecca33da994cf3a5e253c4b5ec82 100644 --- a/src/app/pages/explorer-page/explorer-page.component.ts +++ b/src/app/pages/explorer-page/explorer-page.component.ts @@ -66,7 +66,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { } this._groups = groups; if (this.id !== null) { - this.activateConfig(); + this.activateConfig(true); } } @@ -80,7 +80,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { } catch { console.log('ERROR: Failed parsing input network'); } - this.activateConfig(); + this.activateConfig(true); } @Output() @@ -188,7 +188,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { } } - public activateConfig() { + public activateConfig(updateNetworkFlag=false) { let configObj = typeof this._config === 'string' ? this._config.length === 0 ? {} : JSON5.parse(this._config) : this._config; const groupsObj = typeof this._groups === 'string' ? this._groups.length === 0 ? {} : JSON5.parse(this._groups) : this._groups; @@ -201,7 +201,6 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { // update Drugst.One according to the settings // check if config updates affect network - let updateNetworkFlag = false; for (const key of Object.keys(configObj)) { if (key === 'nodeGroups') { this.setConfigNodeGroup(key, configObj[key]); @@ -232,6 +231,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { this.networkHandler.updateAdjacentNodes(); }); } + } analysisWindowChanged($event: [any[], [Node[], Tissue], NodeInteraction[]]) { @@ -255,7 +255,6 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { */ public async createNetwork() { this.analysis.resetSelection(); - this.networkHandler.activeNetwork.selectedWrapper = null; // getNetwork synchronizes the input network with the database await this.getNetwork(); @@ -308,7 +307,6 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { if (!this.drugstoneConfig.selfReferences) { edges = edges.filter(el => el.from !== el.to); } - this.nodeData.nodes = new vis.DataSet(nodes); this.nodeData.edges = new vis.DataSet(edges); const container = this.networkHandler.activeNetwork.networkEl.nativeElement; @@ -473,9 +471,9 @@ 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]) => { @@ -535,8 +533,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 264016c3d8fd3a40877628a9c9e40e326c95e70f..0bd2c9cbd6e8a1490d030c9955430f7386f63537 100644 --- a/src/index.html +++ b/src/index.html @@ -116,11 +116,11 @@ Export As Graphml Button<br> <!-- network='{"nodes": [{"id":"PSEN1","group":"Protein","label":"PSEN1"},{"id":"PSEN2","group":"Protein","label":"PSEN2"},{"id":"APP","group":"Protein","label":"APP"},{"id":"APOE","group":"Protein","label":"APOE"},{"id":"RNF32","group":"Protein","label":"RNF32"},{"id":"STX5","group":"Protein","label":"STX5"},{"id":"TRAF3IP1","group":"Protein","label":"TRAF3IP1"},{"id":"PHB1","group":"Protein","label":"PHB1"},{"id":"MAPT","group":"Protein","label":"MAPT"},{"id":"ESR1","group":"Protein","label":"ESR1"},{"id":"IRF3","group":"Protein","label":"IRF3"},{"id":"DYNC1H1","group":"Protein","label":"DYNC1H1"},{"id":"CUL3","group":"Protein","label":"CUL3"},{"id":"HMGB1","group":"Protein","label":"HMGB1"},{"id":"DNAJC7","group":"Protein","label":"DNAJC7"},{"id":"NEFM","group":"Protein","label":"NEFM"},{"id":"DISC1","group":"Protein","label":"DISC1"},{"id":"PPP5C","group":"Protein","label":"PPP5C"},{"id":"CTNNB1","group":"Protein","label":"CTNNB1"},{"id":"KRAS","group":"Protein","label":"KRAS"}]}'--> <!-- ></drugst-one>--> - <drugst-one id="netexp1" + <drugst-one id="netexp1" pluginId="2" - groups='{"nodeGroups":{"patient":{"type":"patient","color":"#000000","font":{"color":"#000000"},"groupName":"Patient","shape":"image","image":"https://static.thenounproject.com/png/22780-200.png"},"condition":{"type":"condition","color":"#000000","font":{"color":"#000000"},"groupName":"Condition","shape":"text"},"important":{"type":"gene","color":"#ff881f","font":{"color":"#000000"},"groupName":"Important Gene","shape":"star"},"gene":{"type":"gene","color":"#ff084e","font":{"color":"#000000"},"groupName":"Gene","shape":"diamond"},"foundDrug":{"type":"drug","color":"#F12590","font":{"color":"#000000"},"groupName":"Drug","shape":"diamond"}},"edgeGroups":{"genotype":{"color":"#000000","groupName":"Relevant Gene"},"has-condition":{"color":"#000000","groupName":"Has Condition","dashes":[2,2]},"default":{"color":"#000000","groupName":"default edge"},"ggi":{"color":"#000000","groupName":"Interaction","dashes":[3,2]}}}' - config='{"identifier":"entrez","title":"Breast cancer example network","nodeShadow":true,"edgeShadow":false,"autofillEdges":true,"interactionProteinProtein":"STRING","licensedDatasets":true,"selfReferences":false,"nodeGroups":{"patient":{"type":"patient","color":"#000000","font":{"color":"#000000"},"groupName":"Patient","shape":"image","image":"https://static.thenounproject.com/png/22780-200.png"},"condition":{"type":"condition","color":"#000000","font":{"color":"#000000"},"groupName":"Condition","shape":"text"},"important":{"type":"gene","color":"#ff881f","font":{"color":"#000000"},"groupName":"Important Gene","shape":"star"},"gene":{"type":"gene","color":"#ff084e","font":{"color":"#000000"},"groupName":"Gene","shape":"diamond"},"foundDrug":{"type":"drug","color":"#F12590","font":{"color":"#000000"},"groupName":"Drug","shape":"diamond"}}}' - network='{"nodes":[{"id":"7040","group":"gene","label":"7040"},{"id":"7132","group":"gene","label":"7132"},{"id":"51164","group":"gene","label":"51164"},{"id":"6338","group":"gene","label":"6338"},{"id":"6337","group":"gene","label":"6337"},{"id":"6340","group":"gene","label":"6340"},{"id":"2212","group":"gene","label":"2212"},{"id":"2022","group":"gene","label":"2022"},{"id":"6804","group":"gene","label":"6804"},{"id":"1080","group":"gene","label":"1080"},{"id":"22802","group":"gene","label":"22802"}],"edges":[{"from":"BRCA1","to":"BRCA2","group":"ggi"},{"from":"ATM","to":"BARD1","group":"ggi"},{"from":"BRCA1","to":"CHEK2","group":"ggi"},{"from":"RAD51C","to":"RAD51D","group":"ggi"},{"from":"STK11","to":"TP53","group":"ggi"},{"from":"TP53","to":"PALB2","group":"ggi"},{"from":"TP53","to":"RAD51D","group":"ggi"},{"from":"TP53","to":"NF1","group":"ggi"},{"from":"TP53","to":"BRCA1","group":"ggi"},{"from":"TP53","to":"BRCA2","group":"ggi"},{"from":"PTEN","to":"BRCA1","group":"ggi"},{"from":"PTEN","to":"BRCA2","group":"ggi"},{"from":"TP53","to":"PTEN","group":"ggi"},{"from":"ATM","to":"PTEN","group":"ggi"},{"from":"CDH1","to":"RAD51D","group":"ggi"},{"from":"CDH1","to":"PALB2","group":"ggi"},{"from":"NBN","to":"BRIP1","group":"ggi"},{"from":"BRIP1","to":"PTEN","group":"ggi"},{"from":"patient-1","to":"BRCA1","group":"genotype"},{"from":"patient-1","to":"TP53","group":"genotype"},{"from":"patient-1","to":"BRCA2","group":"genotype"},{"from":"patient-1","to":"PTEN","group":"genotype"},{"from":"patient-2","to":"TP53","group":"genotype"},{"from":"patient-2","to":"NF1","group":"genotype"},{"from":"patient-2","to":"BARD1","group":"genotype"},{"from":"patient-3","to":"TP53","group":"genotype"},{"from":"patient-3","to":"PTEN","group":"genotype"},{"from":"patient-3","to":"NBN","group":"genotype"},{"from":"patient-1","to":"subtype-1","group":"has-condition"},{"from":"patient-2","to":"subtype-1","group":"has-condition"},{"from":"patient-3","to":"subtype-2","group":"has-condition"}]}'> + groups='{}' + 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> diff --git a/src/stylesheets/variables.scss b/src/stylesheets/variables.scss index f00533ce71da99fdb8886e1fdfa0aafaa4a96702..634bed1d6ce4c9bf3cb73f3f35586d7d75b49f87 100644 --- a/src/stylesheets/variables.scss +++ b/src/stylesheets/variables.scss @@ -63,7 +63,7 @@ $b-text-smaller-font-size: 12px; $text-normal-font-size: 12px; $text-small-font-size: 11px; -$privacy-banner-z: 100; +$privacy-banner-z: 40; $fullscreen-z: 2147483646; $toast-z: 2147483647;