Skip to content

Commit

Permalink
Adjusted the initial width of the filter panel.
Browse files Browse the repository at this point in the history
  • Loading branch information
chuanlin2018 committed Jun 20, 2024
1 parent 3e13a61 commit c939745
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class SearchresultComponent implements OnInit {
mobHeight: number;
mobWidth: number;
mobileMode: boolean = false; // set mobile mode to true if window width < 641
filterWidth: number = 39; // Filter expanded by default
filterWidth: number = 499; // Filter expanded by default
filterWidthStr: string;
filterMode: string = "normal";
resultWidth: any;
Expand Down Expand Up @@ -70,7 +70,7 @@ export class SearchresultComponent implements OnInit {
if(this.mouseDragging) {
let diff = this.mouse.x - this.prevMouseX;
this.filterWidth = this.prevFilterWidth + diff;
this.filterWidth = this.filterWidth < 40? 39 : this.filterWidth > 500? 500 : this.filterWidth;
this.filterWidth = this.filterWidth < 40? 49 : this.filterWidth > 500? 500 : this.filterWidth;
this.filterWidthStr = this.filterWidth + 'px';
}

Expand Down Expand Up @@ -111,10 +111,10 @@ export class SearchresultComponent implements OnInit {
}

if(this.filterMode == 'normal'){
this.filterWidth = this.mobWidth / 4;
this.filterWidth = this.mobWidth / 4;
this.filterToggler = 'expanded';
}else{
this.filterWidth = 39;
this.filterWidth = 49;
this.filterToggler = 'collapsed';
}

Expand Down

0 comments on commit c939745

Please sign in to comment.