Skip to content
Snippets Groups Projects
Commit b02883e9 authored by Michael Hartung's avatar Michael Hartung
Browse files

reset selection button

parent d79587c5
No related branches found
No related tags found
No related merge requests found
...@@ -642,7 +642,10 @@ ...@@ -642,7 +642,10 @@
[ngClass]="{ 'text-normal': 'smallStyle' }" [ngClass]="{ 'text-normal': 'smallStyle' }"
> >
<div class="card-content overflow"> <div class="card-content overflow">
<table class="table selection-table" *ngIf="analysis.getCount() > 0"> <table
class="table selection-table"
*ngIf="analysis.getCount() > 0"
>
<thead> <thead>
<tr> <tr>
<td>Label</td> <td>Label</td>
...@@ -654,13 +657,31 @@ ...@@ -654,13 +657,31 @@
</thead> </thead>
<tbody> <tbody>
<tr *ngFor="let p of analysis.getSelection()"> <tr *ngFor="let p of analysis.getSelection()">
<td><p class="is-capitalized">{{p.data.label}}</p></td>
<td><p>{{myConfig.nodeGroups[p.data.group]['groupName']}}</p></td>
<td *ngIf="myConfig.identifier !== 'symbol'"><p>{{p.data.symbol}}</p></td>
<td *ngIf="myConfig.identifier !== 'uniprot'"><p>{{p.data.uniprotAc}}</p></td>
<td> <td>
<button (click)="analysis.removeItems([p])" class="button is-small is-danger is-outlined has-tooltip" <p class="is-capitalized">{{ p.data.label }}</p>
tooltipPosition="top" pTooltip="Remove from selection."> </td>
<td>
<p>
{{ myConfig.nodeGroups[p.data.group]["groupName"] }}
</p>
</td>
<td *ngIf="myConfig.identifier !== 'symbol'">
<p>{{ p.data.symbol }}</p>
</td>
<td *ngIf="myConfig.identifier !== 'uniprot'">
<p>{{ p.data.uniprotAc }}</p>
</td>
<td>
<button
(click)="analysis.removeItems([p])"
class="
button
is-small is-danger is-outlined
has-tooltip
"
tooltipPosition="top"
pTooltip="Remove from selection."
>
<i class="fa fa-trash"></i> <i class="fa fa-trash"></i>
</button> </button>
</td> </td>
...@@ -717,8 +738,8 @@ ...@@ -717,8 +738,8 @@
</a> </a>
</footer> --> </footer> -->
<!-- <footer class="card-footer"> <footer class="card-footer">
<a (click)="analysis.invertSelection(currentViewNodes)" class="card-footer-item text-primary" <!-- <a (click)="analysis.invertSelection(currentViewNodes)" class="card-footer-item text-primary"
tooltipPosition="top" pTooltip="Invert the current selection."> tooltipPosition="top" pTooltip="Invert the current selection.">
<span class="icon"> <span class="icon">
<i class="fa fa-sync"></i> <i class="fa fa-sync"></i>
...@@ -726,17 +747,20 @@ ...@@ -726,17 +747,20 @@
<span> <span>
Invert Invert
</span> </span>
</a> </a> -->
<a (click)="analysis.resetSelection()" class="card-footer-item text-danger" <a
tooltipPosition="top" pTooltip="Remove all entries from the selection."> *ngIf="analysis.getSelection().length"
(click)="analysis.resetSelection()"
class="card-footer-item text-danger"
tooltipPosition="top"
pTooltip="Remove all entries from the selection."
>
<span class="icon"> <span class="icon">
<i class="fa fa-broom"></i> <i class="fa fa-broom"></i>
</span> </span>
<span> <span> Reset </span>
Reset
</span>
</a> </a>
</footer> --> </footer>
<!-- </div> --> <!-- </div> -->
<!-- </div> --> <!-- </div> -->
......
...@@ -209,8 +209,8 @@ export class AnalysisService { ...@@ -209,8 +209,8 @@ export class AnalysisService {
}*/ }*/
resetSelection() { resetSelection() {
this.selectListSubject.next({items: Array.from(this.selectedItems.values()), selected: false});
this.selectedItems.clear(); this.selectedItems.clear();
this.selectListSubject.next({items: [], selected: null});
} }
idInSelection(nodeId: string): boolean { idInSelection(nodeId: string): boolean {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment