mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-30 05:54:17 +00:00
Project toolbar toggle moving button
This commit is contained in:
parent
ca1a6ad6cd
commit
2449ba8c66
@ -82,7 +82,7 @@ export class GraphLayout implements Widget {
|
|||||||
this.drawingsWidget.draw(canvas, this.drawings);
|
this.drawingsWidget.draw(canvas, this.drawings);
|
||||||
|
|
||||||
|
|
||||||
// this.drawingLineTool.connect(view, context);
|
this.drawingLineTool.connect(view);
|
||||||
this.selectionTool.connect(view, context);
|
this.selectionTool.connect(view, context);
|
||||||
|
|
||||||
// const onZoom = function(this: SVGSVGElement) {
|
// const onZoom = function(this: SVGSVGElement) {
|
||||||
|
@ -66,3 +66,10 @@ g.node text,
|
|||||||
-ms-user-select: none;
|
-ms-user-select: none;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Disable outline after button click */
|
||||||
|
.project-toolbar button {
|
||||||
|
outline: 0;
|
||||||
|
border: none;
|
||||||
|
-moz-outline-style: none
|
||||||
|
}
|
||||||
|
@ -22,12 +22,14 @@
|
|||||||
</mat-menu>
|
</mat-menu>
|
||||||
|
|
||||||
<mat-toolbar-row>
|
<mat-toolbar-row>
|
||||||
<button mat-icon-button (click)="turnOnDrawLineMode()" *ngIf="!drawLineMode">
|
<button mat-icon-button [color]="drawLineMode ? 'primary': 'basic'" (click)="toggleDrawLineMode()">
|
||||||
<mat-icon>timeline</mat-icon>
|
<mat-icon>timeline</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
</mat-toolbar-row>
|
||||||
|
|
||||||
<button mat-icon-button color="primary" (click)="turnOffDrawLineMode()" *ngIf="drawLineMode">
|
<mat-toolbar-row>
|
||||||
<mat-icon>timeline</mat-icon>
|
<button mat-icon-button [color]="movingMode ? 'primary': 'basic'" (click)="toggleMovingMode()">
|
||||||
|
<mat-icon>zoom_out_map</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</mat-toolbar-row>
|
</mat-toolbar-row>
|
||||||
|
|
||||||
|
@ -52,6 +52,8 @@ export class ProjectMapComponent implements OnInit {
|
|||||||
|
|
||||||
private ws: Subject<any>;
|
private ws: Subject<any>;
|
||||||
private drawLineMode = false;
|
private drawLineMode = false;
|
||||||
|
private movingMode = false;
|
||||||
|
|
||||||
public isLoading = true;
|
public isLoading = true;
|
||||||
|
|
||||||
@ViewChild(MapComponent) mapChild: MapComponent;
|
@ViewChild(MapComponent) mapChild: MapComponent;
|
||||||
@ -255,13 +257,15 @@ export class ProjectMapComponent implements OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public turnOnDrawLineMode() {
|
public toggleDrawLineMode() {
|
||||||
this.drawLineMode = true;
|
this.drawLineMode = !this.drawLineMode;
|
||||||
|
if (!this.drawLineMode) {
|
||||||
|
this.mapChild.graphLayout.getDrawingLineTool().stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public turnOffDrawLineMode() {
|
public toggleMovingMode() {
|
||||||
this.drawLineMode = false;
|
this.movingMode = !this.movingMode;
|
||||||
this.mapChild.graphLayout.getDrawingLineTool().stop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public onChooseInterface(event) {
|
public onChooseInterface(event) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user