mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-16 06:36:33 +00:00
Option to auto-hide menu toolbar on the left side
This commit is contained in:
parent
81b388a7fe
commit
82891b248f
@ -11,6 +11,7 @@
|
||||
<mat-list-item> ctrl + + to zoom in </mat-list-item>
|
||||
<mat-list-item> ctrl + - to zoom out </mat-list-item>
|
||||
<mat-list-item> ctrl + 0 to reset zoom </mat-list-item>
|
||||
<mat-list-item> ctrl + h to hide toolbar </mat-list-item>
|
||||
<mat-list-item> ctrl + a to select all items on map </mat-list-item>
|
||||
<mat-list-item> ctrl + shift + a to deselect all items on map </mat-list-item>
|
||||
<mat-list-item> ctrl + shift + s to go to preferences </mat-list-item>
|
||||
|
@ -32,7 +32,7 @@
|
||||
[readonly]="inReadOnlyMode"
|
||||
></app-experimental-map>
|
||||
|
||||
<div class="project-toolbar">
|
||||
<div *ngIf="toolbarVisibility" class="project-toolbar">
|
||||
<mat-toolbar color="primary" class="project-toolbar" [ngClass]="{lightTheme: isLightThemeEnabled}">
|
||||
<mat-toolbar-row *ngIf="!isLightThemeEnabled">
|
||||
<button matTooltip="Open menu" mat-icon-button [matMenuTriggerFor]="mainMenu"><mat-icon svgIcon="gns3"></mat-icon></button>
|
||||
@ -163,11 +163,11 @@
|
||||
</mat-toolbar>
|
||||
</div>
|
||||
|
||||
<div id="show-menu-wrapper" [ngClass]="{lightTheme: isLightThemeEnabled, shadowed: !isProjectMapMenuVisible }" *ngIf="!readonly">
|
||||
<div *ngIf="toolbarVisibility" id="show-menu-wrapper" [ngClass]="{lightTheme: isLightThemeEnabled, shadowed: !isProjectMapMenuVisible }">
|
||||
<button [ngClass]="{lightTheme: isLightThemeEnabled}" class="arrow-button" mat-icon-button (click)="showMenu()"><mat-icon class="unmarked">keyboard_arrow_right</mat-icon></button>
|
||||
</div>
|
||||
|
||||
<div id="menu-wrapper" [ngClass]="{lightTheme: isLightThemeEnabled, extended: isProjectMapMenuVisible }">
|
||||
<div *ngIf="toolbarVisibility" id="menu-wrapper" [ngClass]="{lightTheme: isLightThemeEnabled, extended: isProjectMapMenuVisible }">
|
||||
<app-nodes-menu [server]="server" [project]="project"></app-nodes-menu>
|
||||
<mat-divider class="divider" [vertical]="true"></mat-divider>
|
||||
<app-project-map-menu [server]="server" [project]="project"></app-project-map-menu>
|
||||
|
@ -91,6 +91,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
public notificationsVisibility: boolean = false;
|
||||
public layersVisibility: boolean = false;
|
||||
public gridVisibility: boolean = false;
|
||||
public toolbarVisibility: boolean = true;
|
||||
|
||||
tools = {
|
||||
selection: true,
|
||||
@ -294,6 +295,11 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
this.selectionManager.setSelected(allNodes.concat(allDrawings).concat(allLinks).concat(allSymbols));
|
||||
});
|
||||
|
||||
Mousetrap.bind('ctrl+h', (event: Event) => {
|
||||
event.preventDefault();
|
||||
this.toolbarVisibility = !this.toolbarVisibility;
|
||||
});
|
||||
|
||||
Mousetrap.bind('ctrl+shift+a', (event: Event) => {
|
||||
event.preventDefault();
|
||||
this.selectionManager.setSelected([]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user