Skip to content
This repository has been archived by the owner on Jun 20, 2020. It is now read-only.

Commit

Permalink
feat: auto width on dblclick
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMalch committed May 16, 2019
1 parent 2468c9d commit 70d2eb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/app/core/nav/nav.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
<app-drag-sizer
*ngIf="!(isHandset$ | async)"
(xPos)="width = $event"
(dblclick)="autoWidth()"
[style.left.px]="width - 2"
></app-drag-sizer>

Expand Down
4 changes: 4 additions & 0 deletions src/app/core/nav/nav.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ export class NavComponent implements OnInit {
});
}

autoWidth() {
this.width = document.querySelector("app-file-tree").clientWidth + 10;
}

get onViewUrl(): boolean {
return location.pathname.startsWith('/view');
}
Expand Down

0 comments on commit 70d2eb8

Please sign in to comment.