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