Skip to content
Snippets Groups Projects
Commit b1144a0b authored by Yuncong Yu's avatar Yuncong Yu
Browse files

Add inputs for horizontal scaling.

parent b08d3af2
No related branches found
No related tags found
No related merge requests found
...@@ -53,8 +53,9 @@ html, body { ...@@ -53,8 +53,9 @@ html, body {
overflow-y: scroll; overflow-y: scroll;
} }
.small-margin { .parameter {
margin: auto; margin: auto;
padding: 2px;
} }
button { button {
......
...@@ -21,15 +21,27 @@ ...@@ -21,15 +21,27 @@
Dataset overview Dataset overview
</div> </div>
<div class="toolbar"> <div class="toolbar">
<label class="parameter" for="min">Start</label><br>
<input type="number" class="parameter" id="min" [(ngModel)]="minx">
<label class="small-margin" for="min">Start</label><br> <label class="parameter" for="max">End</label><br>
<input type="number" class="small-margin" id="min" [(ngModel)]="minx"> <input type="number" class="parameter" [(ngModel)]="maxx" id="max">
<label class="small-margin" for="max">End</label><br> <label class="parameter" for="w">Length</label><br>
<input type="number" class="small-margin" [(ngModel)]="maxx" id="max"> <input type="number" class="parameter" [(ngModel)]="windowsize" id="w">
<label class="parameter" for="length-scaling">x scaling</label><br>
<input type="checkbox" class="parameter" [(ngModel)]="hasHorizontalScaling" id="length-scaling">
<label class="parameter" for="relWidth-min">Min</label><br>
<input type="number" class="parameter" [(ngModel)]="relwidthMin" id="relWidth-min" step="0.1" min="0.1" max="1" [disabled]="!hasHorizontalScaling">
<label class="parameter" for="relWidth-min">Max</label><br>
<input type="number" class="parameter" [(ngModel)]="relwidthMax" id="relWidth-max" step="1" min="1" [disabled]="!hasHorizontalScaling">
<label class="parameter" for="resolution">Resolution</label><br>
<input type="number" class="parameter" [(ngModel)]="resolution" id="resolution" step="1" min="3" [disabled]="!hasHorizontalScaling">
<label class="small-margin" for="w">Window Size</label><br>
<input type="number" class="small-margin" [(ngModel)]="windowsize" id="w">
<button (click)="setquery()"> <button (click)="setquery()">
Set as query Set as query
</button> </button>
......
...@@ -22,6 +22,10 @@ export class OverviewWindowComponent implements OnInit { ...@@ -22,6 +22,10 @@ export class OverviewWindowComponent implements OnInit {
public allChannels: number[]; public allChannels: number[];
private _minx; private _minx;
private _maxx; private _maxx;
private _hasHorizontalScaling = false;
private _relwidthMin = 0.5;
private _relwidthMax = 2;
private _resolution = 7;
public currentSelection; public currentSelection;
private showingCandidates = false; private showingCandidates = false;
...@@ -229,7 +233,6 @@ export class OverviewWindowComponent implements OnInit { ...@@ -229,7 +233,6 @@ export class OverviewWindowComponent implements OnInit {
}); });
} }
async updateChannels() { async updateChannels() {
console.log('updating plot'); console.log('updating plot');
console.log(this.state.selection); console.log(this.state.selection);
...@@ -525,6 +528,36 @@ export class OverviewWindowComponent implements OnInit { ...@@ -525,6 +528,36 @@ export class OverviewWindowComponent implements OnInit {
this.maxx = this.minx + size; this.maxx = this.minx + size;
} }
get relwidthMax() {
return this._relwidthMax;
}
set relwidthMax(value) {
this._relwidthMax = value;
}
get relwidthMin() {
return this._relwidthMin;
}
set relwidthMin(value) {
this._relwidthMin = value;
}
get resolution(): number {
return this._resolution;
}
set resolution(value: number) {
this._resolution = value;
}
get hasHorizontalScaling(): boolean {
return this._hasHorizontalScaling;
}
set hasHorizontalScaling(value: boolean) {
this._hasHorizontalScaling = value;
}
get names(): string[] { get names(): string[] {
return this.state.rawData.map((data, index) => data.name ? data.name : 'Channel ' + index.toString()); return this.state.rawData.map((data, index) => data.name ? data.name : 'Channel ' + index.toString());
} }
......
...@@ -89,7 +89,6 @@ export class StateService { ...@@ -89,7 +89,6 @@ export class StateService {
this.onNewWindows.emit(); this.onNewWindows.emit();
} }
/** /**
* This function performs the first iteration of LSH * This function performs the first iteration of LSH
*/ */
......
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