Skip to content
Snippets Groups Projects
Commit ce55cc8d authored by Maiykol's avatar Maiykol
Browse files

revert dashed to dashes

parent f82f58fe
No related branches found
No related tags found
No related merge requests found
Pipeline #11035 failed
This diff is collapsed.
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<ng-container *ngIf="this.config.showLegendEdges"> <ng-container *ngIf="this.config.showLegendEdges">
<tr *ngFor="let edgeGroup of this.config.edgeGroups | keyvalue" class="list-item"> <tr *ngFor="let edgeGroup of this.config.edgeGroups | keyvalue" class="list-item">
<td> <td>
<hr *ngIf="!edgeGroup.value.dashed" class="edge" [style.background-color]=edgeGroup.value.color> <hr *ngIf="!edgeGroup.value.dashes" class="edge" [style.background-color]=edgeGroup.value.color>
<hr *ngIf="edgeGroup.value.dashed" class="edge dashed" [style.color]=edgeGroup.value.color> <hr *ngIf="edgeGroup.value.dashes" class="edge dashes" [style.color]=edgeGroup.value.color>
</td> </td>
<td>&nbsp;{{ edgeGroup.value.groupName }}</td> <td>&nbsp;{{ edgeGroup.value.groupName }}</td>
</tr> </tr>
......
...@@ -76,7 +76,7 @@ div.legend { ...@@ -76,7 +76,7 @@ div.legend {
height: $legend-edge-height; height: $legend-edge-height;
/* Center edge icon */ /* Center edge icon */
margin: 0 auto; margin: 0 auto;
&.dashed { &.dashes {
border-top: dotted; border-top: dotted;
} }
......
...@@ -2,6 +2,7 @@ export interface NodeGroup { ...@@ -2,6 +2,7 @@ export interface NodeGroup {
groupName: string; groupName: string;
color: string; color: string;
shape: 'circle' | 'triangle' | 'star' | 'square' | 'image'; shape: 'circle' | 'triangle' | 'star' | 'square' | 'image';
type: string;
image?: string; image?: string;
detailShowLabel?: boolean; detailShowLabel?: boolean;
} }
...@@ -10,7 +11,7 @@ export interface EdgeGroup { ...@@ -10,7 +11,7 @@ export interface EdgeGroup {
groupName: string; groupName: string;
color: string; color: string;
// see https://visjs.github.io/vis-network/docs/network/edges.html // see https://visjs.github.io/vis-network/docs/network/edges.html
dashed?: false | Array<number>; dashes?: false | Array<number>;
} }
export type Identifier = 'symbol'|'uniprot'|'ensg'; export type Identifier = 'symbol'|'uniprot'|'ensg';
...@@ -77,17 +78,20 @@ export const defaultConfig: IConfig = { ...@@ -77,17 +78,20 @@ export const defaultConfig: IConfig = {
groupName: 'Default Node Group', groupName: 'Default Node Group',
color: 'yellow', color: 'yellow',
shape: 'triangle', shape: 'triangle',
type: 'default type',
detailShowLabel: false, detailShowLabel: false,
}, },
default_protein: { default_protein: {
groupName: 'Resulting Proteins', groupName: 'Resulting Proteins',
color: 'red', color: 'red',
shape: 'circle', shape: 'circle',
type: 'default protein type',
}, },
default_drug: { default_drug: {
groupName: 'Possible Drugs', groupName: 'Possible Drugs',
color: 'green', color: 'green',
shape: 'star', shape: 'star',
type: 'default drug type',
} }
}, },
edgeGroups: { edgeGroups: {
...@@ -95,7 +99,7 @@ export const defaultConfig: IConfig = { ...@@ -95,7 +99,7 @@ export const defaultConfig: IConfig = {
// this default group is used for default edge group values // this default group is used for default edge group values
groupName: 'Default Edge Group', groupName: 'Default Edge Group',
color: 'black', color: 'black',
dashed: false dashes: false
} }
}, },
}; };
...@@ -4,6 +4,7 @@ export interface Node { ...@@ -4,6 +4,7 @@ export interface Node {
label: string; label: string;
symbol: string; symbol: string;
id: string; id: string;
type: string;
netexId?: string; netexId?: string;
uniprotAc?: string; uniprotAc?: string;
ensg?: Array<string>; ensg?: Array<string>;
...@@ -160,6 +161,7 @@ export interface Wrapper { ...@@ -160,6 +161,7 @@ export interface Wrapper {
data: { data: {
id: string; id: string;
label: string; label: string;
type?: string;
symbol?: string; symbol?: string;
netexId?: string; netexId?: string;
ensg?: Array<string>; ensg?: Array<string>;
......
...@@ -189,9 +189,8 @@ ...@@ -189,9 +189,8 @@
aria-hidden="true"></i> --> aria-hidden="true"></i> -->
</span> </span>
<span *ngIf="!selectedWrapper">No item selected</span> <span *ngIf="!selectedWrapper">No item selected</span>
<span *ngIf="selectedWrapper && selectedWrapper.data.netexId"> <span *ngIf="selectedWrapper">
<!-- <span *ngIf="selectedWrapper.data.type">selectedWrapper.data.type</span> --> <span>selectedWrapper.data.type</span>
<span *ngIf="selectedWrapper.data.netexId.startsWith('d')">Drug</span>
</span> </span>
</p> </p>
<a (click)="collapseDetails = !collapseDetails" data-action="collapse" <a (click)="collapseDetails = !collapseDetails" data-action="collapse"
......
...@@ -392,9 +392,9 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -392,9 +392,9 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
} }
// make sure all keys are set // make sure all keys are set
Object.entries(edgeGroups).forEach(([key, value]) => { Object.entries(edgeGroups).forEach(([key, value]) => {
if (!('dashed' in value)) { if (!('dashes' in value)) {
// use dashed default value if not set // use dashes default value if not set
value['dashed'] = defaultConfig.edgeGroups.default.dashed; value['dashes'] = defaultConfig.edgeGroups.default.dashes;
} }
}) })
// override default node groups // override default node groups
......
...@@ -38,14 +38,14 @@ ...@@ -38,14 +38,14 @@
<network-expander id="netexp1" <network-expander id="netexp1"
config='{ config='{
"nodeGroups": {"0.5": {"color": "rgb(204, 255, 51)", "groupName": "0.5", "shape": "circle"}, "patient_group": {"detailShowLabel": "true", "color": "red", "groupName": "patient group", "shape": "circle"}}, "nodeGroups": {"0.5": {"type": "0.5er Instanz", "color": "rgb(204, 255, 51)", "groupName": "0.5", "shape": "circle"}, "patient_group": {"type": "Patient", "detailShowLabel": "true", "color": "red", "groupName": "patient group", "shape": "circle"}},
"edgeGroups": {"dashed": {"color": "black", "groupName": "Dashed Group", "dashed": [1, 2]}, "notdashed": {"color": "black", "groupName": "not Dashed Group"}}, "edgeGroups": {"dashes": {"color": "black", "groupName": "dashes Group", "dashes": [1, 2]}, "notdashes": {"color": "black", "groupName": "not dashes Group"}},
"identifier": "symbol" "identifier": "symbol"
}' }'
network='{ network='{
"nodes": [{"id": "MYC", "label": "node w/o group"}, {"id": "TP53", "group": "0.5"}, {"id": "C5", "group": "0.5"}, {"id": "Patient", "group": "patient_group"}, {"label": "PTEN", "id": "PTEN", "group": 0.5}], "nodes": [{"id": "MYC", "label": "node w/o group"}, {"id": "TP53", "group": "0.5"}, {"id": "C5", "group": "0.5"}, {"id": "Patient No. 5", "group": "patient_group"}, {"label": "PTEN", "id": "PTEN", "group": 0.5}],
"edges": [ "edges": [
{"from": "TP53","to": "C5","group": "dashed", "label": "this is a label", "title": "this is a title"}, {"from": "TP53","to": "C5","group": "dashes", "label": "this is a label", "title": "this is a title"},
{"from": "Patient No. 5","to": "C5","label": "w/o group"} {"from": "Patient No. 5","to": "C5","label": "w/o group"}
] ]
}' }'
......
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