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 class="is-hidden-mobile fullheight" id="appContainer">
<app-license-agreement></app-license-agreement>
<app-launch-analysis
......@@ -10,7 +9,6 @@
>
</app-launch-analysis>
<app-add-expressed-proteins
[(show)]="showThresholdDialog"
[selectedTissue]="networkHandler.activeNetwork.currentViewSelectedTissue"
......@@ -190,9 +188,15 @@
</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
*ngIf="drugstoneConfig.config.showAdvAnalysis"
......@@ -465,17 +469,18 @@
</i>
</div>
<footer class="card-footer">
<!-- <a (click)="analysis.invertSelection(currentViewNodes)" class="card-footer-item text-primary"
tooltipPosition="top" pTooltip="Invert the current selection.">
<a
(click)="analysis.invertSelection(networkHandler.activeNetwork.currentViewNodes)"
class="card-footer-item text-primary"
tooltipPosition="top"
pTooltip="Invert the current selection."
>
<span class="icon">
<i class="fa fa-sync"></i>
</span>
<span>
Invert
</span>
</a> -->
<span> Invert </span>
</a>
<a
*ngIf="analysis.getSelection().length"
(click)="analysis.resetSelection()"
......@@ -510,10 +515,7 @@
></app-analysis-panel>
</div>
<!-- explorer network -->
<app-network
networkType="explorer"
[nodeData]="nodeData"
></app-network>
<app-network networkType="explorer" [nodeData]="nodeData"></app-network>
</div>
<!-- End network block -->
......
......@@ -177,16 +177,20 @@ export class AnalysisService {
public invertSelection(nodes) {
const newSelection = [];
nodes.forEach((node: Node) => {
if (node.drugstoneType !== 'protein') {
// only consider proteins
return
}
const wrapper = getWrapperFromNode(node);
if (!this.inSelection(wrapper)) {
newSelection.push(wrapper);
}
});
this.selectedItems.clear();
this.resetSelection()
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() {
......
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