Skip to content
Snippets Groups Projects
Commit be74b364 authored by ge54hev's avatar ge54hev
Browse files

selection by ctrl

parent 8ed9293e
No related branches found
No related tags found
No related merge requests found
...@@ -166,7 +166,7 @@ ...@@ -166,7 +166,7 @@
<!-- </header>--> <!-- </header>-->
<div *ngIf="showDetails" class="card-content"> <div *ngIf="showDetails" class="card-content">
<div class="content"> <div class="content">
<h2>Summary</h2> <!-- <h2>Summary</h2>-->
<figure class="image"> <figure class="image">
<!-- <img src="assets/boxplot.png" alt="Boxplots">--> <!-- <img src="assets/boxplot.png" alt="Boxplots">-->
</figure> </figure>
......
import {AfterViewInit, Component, ElementRef, OnInit, ViewChild, Output, EventEmitter} from '@angular/core'; import {AfterViewInit, Component, ElementRef, OnInit, ViewChild, Output, EventEmitter, HostListener} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router'; import {ActivatedRoute, Router} from '@angular/router';
import {Effect, Protein, ProteinNetwork} from '../protein-network'; import {Effect, Protein, ProteinNetwork} from '../protein-network';
import {HttpClient} from '@angular/common/http'; import {HttpClient} from '@angular/common/http';
...@@ -19,6 +19,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -19,6 +19,7 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
public geneNames: Array<string> = []; public geneNames: Array<string> = [];
public proteinNames: Array<string> = []; public proteinNames: Array<string> = [];
public proteinAcs: Array<string> = []; public proteinAcs: Array<string> = [];
public watcher = 0;
public viralProteinCheckboxes: Array<{ checked: boolean; data: Effect }> = []; public viralProteinCheckboxes: Array<{ checked: boolean; data: Effect }> = [];
...@@ -40,6 +41,32 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -40,6 +41,32 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
public queryItems = []; public queryItems = [];
public showAnalysisDialog = false; public showAnalysisDialog = false;
@HostListener('window:keydown', ['$event'])
handleKeyboardEvent1(event: KeyboardEvent) {
if (event.keyCode == 17)
{
this.watcher = 1;
console.log(this.watcher);
}
}
@HostListener('window:keyup', ['$event'])
handleKeyboardEvent(event: KeyboardEvent) {
if (event.keyCode == 17)
{
this.watcher = 0;
console.log(this.watcher);
}
}
@ViewChild('network', {static: false}) networkEl: ElementRef; @ViewChild('network', {static: false}) networkEl: ElementRef;
constructor(private http: HttpClient, constructor(private http: HttpClient,
...@@ -189,11 +216,22 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit { ...@@ -189,11 +216,22 @@ export class ExplorerPageComponent implements OnInit, AfterViewInit {
const id: Array<string> = properties.nodes; const id: Array<string> = properties.nodes;
// TODO use groupID // TODO use groupID
console.log(id); console.log(id);
console.log(this.watcher);
if (id.length > 0) { if (id.length > 0) {
console.log('clicked node:', id); console.log('clicked node:', id);
if (id[0].startsWith('pg_')) { if (id[0].startsWith('pg_')) {
const protein = this.proteinData.getProtein(id[0].substr(3)); const protein = this.proteinData.getProtein(id[0].substr(3));
this.openSummary(protein, false); this.openSummary(protein, false);
console.log(this.currentProteinAc);
if (this.watcher==1){
if(this.inSelection(protein.proteinAc) == true){
console.log(this.removeFromSelection(protein.proteinAc));
} else{
console.log(this.addToSelection(protein.proteinAc));
// console.log(this.removeFromSelection(this.currentProteinAc));
console.log(this.analysis.getCount());
}
}
} else { } else {
this.closeSummary(); this.closeSummary();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment