Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
kulgg committed Jan 11, 2024
1 parent bdbc61e commit 981996e
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export class MarkdownDescriptionComponent implements OnInit, AfterViewInit {
@Input() description!: string | undefined;
@ViewChild('content')
elementView!: ElementRef;
contentHeight!: number;
isLargeDescription = false;
isCollapsed = false;
collapsedDescriptionHeight!: number;
Expand All @@ -36,9 +35,9 @@ export class MarkdownDescriptionComponent implements OnInit, AfterViewInit {
}

ngAfterViewInit() {
this.contentHeight = this.elementView.nativeElement.offsetHeight;
const contentHeight = this.elementView.nativeElement.offsetHeight;

if (this.contentHeight > this.collapsedDescriptionHeight) {
if (contentHeight > this.collapsedDescriptionHeight) {
this.isLargeDescription = true;
this.isCollapsed = true;
this.cd.detectChanges();
Expand Down

0 comments on commit 981996e

Please sign in to comment.