Button added

This commit is contained in:
Piotr Pekala 2019-10-24 08:10:03 -07:00
parent b372493e51
commit 6274c90a33
2 changed files with 7 additions and 0 deletions

View File

@ -96,6 +96,9 @@
</mat-checkbox><br/>
<mat-checkbox [ngModel]="gridVisibility" (change)="toggleGrid($event.checked)">
Show grid
</mat-checkbox><br/>
<mat-checkbox [ngModel]="project.snap_to_grid" (change)="toggleSnapToGrid($event.checked)">
Snap to grid
</mat-checkbox>
</div>
</mat-menu>

View File

@ -504,6 +504,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
this.mapChild.gridVisibility = this.gridVisibility ? 1 : 0;
}
public toggleSnapToGrid(enabled: boolean) {
this.project.snap_to_grid = enabled;
}
private showMessage(msg) {
if (this.notificationsVisibility) {
if (msg.type === 'error') this.toasterService.error(msg.message);