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

reverse selection

parent 93ae0f3e
No related branches found
No related tags found
No related merge requests found
<div id="appWindow" (window:resize)="onResize($event)"> <div id="appWindow" (window:resize)="onResize($event)">
<div class="is-hidden-mobile fullheight" id="appContainer"> <div class="is-hidden-mobile fullheight" id="appContainer">
<app-license-agreement></app-license-agreement> <app-license-agreement></app-license-agreement>
<app-launch-analysis <app-launch-analysis
...@@ -10,7 +9,6 @@ ...@@ -10,7 +9,6 @@
> >
</app-launch-analysis> </app-launch-analysis>
<app-add-expressed-proteins <app-add-expressed-proteins
[(show)]="showThresholdDialog" [(show)]="showThresholdDialog"
[selectedTissue]="networkHandler.activeNetwork.currentViewSelectedTissue" [selectedTissue]="networkHandler.activeNetwork.currentViewSelectedTissue"
...@@ -190,9 +188,15 @@ ...@@ -190,9 +188,15 @@
</div> </div>
</div> </div>
<app-quick-drug-target *ngIf="drugstoneConfig.config.showConnectGenes" (taskEvent)="emitTaskEvent($event)"></app-quick-drug-target> <app-quick-drug-target
*ngIf="drugstoneConfig.config.showConnectGenes"
(taskEvent)="emitTaskEvent($event)"
></app-quick-drug-target>
<app-quick-drug *ngIf="drugstoneConfig.config.showSimpleAnalysis" (taskEvent)="emitTaskEvent($event)"></app-quick-drug> <app-quick-drug
*ngIf="drugstoneConfig.config.showSimpleAnalysis"
(taskEvent)="emitTaskEvent($event)"
></app-quick-drug>
<div <div
*ngIf="drugstoneConfig.config.showAdvAnalysis" *ngIf="drugstoneConfig.config.showAdvAnalysis"
...@@ -465,17 +469,18 @@ ...@@ -465,17 +469,18 @@
</i> </i>
</div> </div>
<footer class="card-footer"> <footer class="card-footer">
<!-- <a (click)="analysis.invertSelection(currentViewNodes)" class="card-footer-item text-primary" <a
tooltipPosition="top" pTooltip="Invert the current selection."> (click)="analysis.invertSelection(networkHandler.activeNetwork.currentViewNodes)"
class="card-footer-item text-primary"
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>
</span> </span>
<span> <span> Invert </span>
Invert </a>
</span>
</a> -->
<a <a
*ngIf="analysis.getSelection().length" *ngIf="analysis.getSelection().length"
(click)="analysis.resetSelection()" (click)="analysis.resetSelection()"
...@@ -510,10 +515,7 @@ ...@@ -510,10 +515,7 @@
></app-analysis-panel> ></app-analysis-panel>
</div> </div>
<!-- explorer network --> <!-- explorer network -->
<app-network <app-network networkType="explorer" [nodeData]="nodeData"></app-network>
networkType="explorer"
[nodeData]="nodeData"
></app-network>
</div> </div>
<!-- End network block --> <!-- End network block -->
......
...@@ -177,16 +177,20 @@ export class AnalysisService { ...@@ -177,16 +177,20 @@ export class AnalysisService {
public invertSelection(nodes) { public invertSelection(nodes) {
const newSelection = []; const newSelection = [];
nodes.forEach((node: Node) => { nodes.forEach((node: Node) => {
if (node.drugstoneType !== 'protein') {
// only consider proteins
return
}
const wrapper = getWrapperFromNode(node); const wrapper = getWrapperFromNode(node);
if (!this.inSelection(wrapper)) { if (!this.inSelection(wrapper)) {
newSelection.push(wrapper); newSelection.push(wrapper);
} }
}); });
this.selectedItems.clear(); this.resetSelection()
for (const wrapper of newSelection) { for (const wrapper of newSelection) {
this.selectedItems.set(wrapper.nodeId, wrapper); this.selectedItems.set(wrapper.id, wrapper);
} }
this.selectListSubject.next({items: newSelection, selected: null}); this.selectListSubject.next({items: newSelection, selected: true});
} }
resetSelection() { resetSelection() {
......
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