diff --git a/src/app/components/network/network-menu-left/network-menu-left.component.scss b/src/app/components/network/network-menu-left/network-menu-left.component.scss index d008046579ff02cfc6129e392e227fb2a7f8d8c5..e411e8aefcd208ff46898eed4e08e0c1c2707d40 100644 --- a/src/app/components/network/network-menu-left/network-menu-left.component.scss +++ b/src/app/components/network/network-menu-left/network-menu-left.component.scss @@ -97,5 +97,18 @@ } .dropdown-menu{ - z-index: $network-tissue-options-z !important; + z-index: $network-tissue-options-z !important; + + .dropdown-content { + padding-left: 0.5rem; + padding-right: 0.5rem; + .dropdown-item { + padding: .375rem 0rem !important; + padding-left: 0.5rem !important; + } + margin-left: calc(150px - 24px); + margin-right: calc(150px - 24px); + width: 250px; + margin-top: -45px; + } } diff --git a/src/app/components/network/network-menu/network-menu.component.scss b/src/app/components/network/network-menu/network-menu.component.scss index 35a8f92bf7be0eb9903512cb0556f0297cc716f6..63577262f2ef1b5e2a091d1d0a8c387074d03b75 100644 --- a/src/app/components/network/network-menu/network-menu.component.scss +++ b/src/app/components/network/network-menu/network-menu.component.scss @@ -43,30 +43,37 @@ top: $network-header-height; background-color: var(--drgstn-panel-secondary); z-index: $network-footer-container-z; + &.small-sidebar { width: $network-footer-width-small; } + &.no-header { top: 0; height: 100%; } + &.opened { right: 0; animation-name: showSidebar; animation-duration: 1s; + &.small-sidebar { animation-name: showSidebarSmall; } } + &.closed { right: $network-footer-right-closed; animation-name: hideSidebar; animation-duration: 1s; + &.small-sidebar { animation-name: hideSidebarSmall; right: $network-footer-right-closed-small; } } + &-inner-container { width: 100%; height: $network-footer-inner-container-height; @@ -87,16 +94,33 @@ margin: 0px; left: -12px; padding: calc(.75em - 1px) !important; + &.rotated { -ms-transform: rotate(180deg); /* IE 9 */ transform: rotate(180deg); } - .dropdown-menu { - z-index: $network-tissue-options-z; + } +} + +.dropdown-menu { + z-index: $network-tissue-options-z !important; + + .dropdown-content { + padding-left: 0.5rem; + padding-right: 0.5rem; - .scroll-area { - height: 15rem; - } + .dropdown-item { + padding: .375rem 0rem !important; + padding-left: 0.5rem !important; } + + margin-left: calc(-250px - 12px); + margin-right: calc(-250px - 12px); + width: 250px; + margin-top: -45px; + } + + .scroll-area { + height: 15rem; } } diff --git a/src/index_static.html b/src/index_static.html index a568ac0c4c47e945cae22217c7306486f7fdf6e4..1e05ab0f3ad23802fe6569a344ac85b53c1b0bc5 100644 --- a/src/index_static.html +++ b/src/index_static.html @@ -6,8 +6,8 @@ <!-- <base href="/">--> <!-- <meta name="viewport" content="width=device-width, initial-scale=1.0">--> <!-- <script type="text/javascript" src="https://unpkg.com/vis-network/standalone/umd/vis-network.min.js"></script>--> - <script src="https://cdn.drugst.one/latest/drugstone.js"></script> - <link rel="stylesheet" href="https://cdn.drugst.one/latest/styles.css"> + <script src="https://cdn.drugst.one/v1.0.0-rc4/prod/drugstone.js"></script> + <link rel="stylesheet" href="https://cdn.drugst.one/v1.0.0-rc4/prod/styles.css"> <!-- <link rel="stylesheet" type="text/css" href="./stylesheets/theme.css">--> </head> <body> @@ -94,7 +94,7 @@ <drugst-one id="netexp1" pluginId="2" config='{"interactionDrugProtein":"NeDRex", "physicsOn":true, "showLeftSidebar": true, "showSimpleAnalysis":true, "nodeGroups":{"patient":{"type":"patient","color":"black","font":{"color":"#ffffff"},"groupName":"Patient","shape":"image","image":"https://static.thenounproject.com/png/22780-200.png"},"condition":{"type":"condition","color":"black","font":{"color":"black"},"groupName":"Condition","shape":"text"},"important":{"type":"gene","color":"#ff881f","font":{"color":"#000000"},"groupName":"Important Gene","shape":"star"},"gene":{"type":"gene","color":"#4da300","font":{"color":"#ffffff"},"groupName":"Gene","shape":"circle"},"foundDrug":{"type":"drug","color":{"border":"#F12590","background":"#F12590"},"font":{"color":"#f0f0f0"},"groupName":"Drug","shape":"diamond"}},"edgeGroups":{"genotype":{"color":"black","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]}},"identifier":"symbol","title":"Breast cancer example network","nodeShadow":true,"edgeShadow":false,"autofillEdges":true,"showLegend":true}' - network='{"nodes":[{"id":"patient-1","group":"patient","x":592,"y":446},{"id":"patient-2","group":"patient","x":235,"y":87},{"id":"patient-3","group":"patient","x":105,"y":369},{"id":"ATM","label":"ATM","group":"gene","x":289,"y":242},{"id":"BARD1","label":"BARD1","group":"gene","x":44,"y":250},{"id":"BRCA1","label":"BRCA1","group":"gene","x":466,"y":576},{"id":"BRCA2","label":"BRCA2","group":"gene","x":507,"y":285},{"id":"BRIP1","label":"BRIP1","group":"gene","x":54,"y":474},{"id":"CHEK2","label":"CHEK2","group":"gene","x":216,"y":590},{"id":"CDH1","label":"CDH1","group":"gene","x":320,"y":-57},{"id":"NF1","label":"NF1","group":"gene","x":481,"y":111},{"id":"NBN","label":"NBN","group":"gene","x":-57,"y":314},{"id":"PALB2","label":"PALB2","group":"gene","x":450,"y":190},{"id":"PTEN","label":"PTEN","group":"important","x":305,"y":494},{"id":"RAD51C","label":"RAD51C","group":"gene","x":182,"y":-90},{"id":"RAD51D","label":"RAD51D","group":"gene","x":368,"y":73},{"id":"STK11","label":"STK11","group":"gene","x":686,"y":330},{"id":"TP53","label":"TP53","group":"important","x":333,"y":316},{"id":"subtype-1","label":"Subtype 1","group":"condition","x":556,"y":171},{"id":"subtype-2","label":"Subtype 2","group":"condition","x":-87,"y":221}],"edges":[]}'> + network='{"nodes":[{"id":"patient-1","group":"patient","x":592,"y":446},{"id":"patient-2","group":"patient","x":235,"y":87},{"id":"patient-3","group":"patient","x":105,"y":369},{"id":"ATM","label":"ATM","group":"gene","x":289,"y":242},{"id":"BARD1","label":"BARD1","group":"gene","x":44,"y":250},{"id":"BRCA1","label":"BRCA1","group":"gene","x":466,"y":576},{"id":"BRCA2","label":"BRCA2","group":"gene","x":507,"y":285},{"id":"BRIP1","label":"BRIP1","group":"gene","x":54,"y":474},{"id":"CHEK2","label":"CHEK2","group":"gene","x":216,"y":590},{"id":"CDH1","label":"CDH1","group":"gene","x":320,"y":-57},{"id":"NF1","label":"NF1","group":"gene","x":481,"y":111},{"id":"NBN","label":"NBN","group":"gene","x":-57,"y":314},{"id":"PALB2","label":"PALB2","group":"gene","x":450,"y":190},{"id":"PTEN","label":"PTEN","group":"important","x":305,"y":494},{"id":"RAD51C","label":"RAD51C","group":"gene","x":182,"y":-90},{"id":"RAD51D","label":"RAD51D","group":"gene","x":368,"y":73},{"id":"STK11","label":"STK11","group":"gene","x":686,"y":330},{"id":"TP53","label":"TP53","group":"important","x":333,"y":316},{"id":"subtype-1","label":"Subtype 1","group":"condition","x":556,"y":171},{"id":"subtype-2","label":"Subtype 2","group":"condition","x":-87,"y":221}],"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"}]}'> </drugst-one> </div>