Option in menu

This commit is contained in:
piotrpekala7
2020-07-13 17:28:35 +02:00
parent 46c6cd1d7e
commit a3142c6fb1
3 changed files with 9 additions and 0 deletions

View File

@ -129,6 +129,9 @@
</mat-checkbox><br/> </mat-checkbox><br/>
<mat-checkbox [ngModel]="project.snap_to_grid" (change)="toggleSnapToGrid($event.checked)"> <mat-checkbox [ngModel]="project.snap_to_grid" (change)="toggleSnapToGrid($event.checked)">
Snap to grid Snap to grid
</mat-checkbox><br/>
<mat-checkbox [ngModel]="mapSettingsService.integrateLinkLabelsToLinks" (change)="toggleIntegrateLinkLabelsToLinks($event.checked)">
Integrate link labels to links
</mat-checkbox> </mat-checkbox>
</div> </div>
</mat-menu> </mat-menu>

View File

@ -721,6 +721,10 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
this.project.snap_to_grid = enabled; this.project.snap_to_grid = enabled;
} }
public toggleIntegrateLinkLabelsToLinks(enabled: boolean) {
this.mapSettingsService.integrateLinkLabelsToLinks = enabled;
}
private showMessage(msg) { private showMessage(msg) {
if (this.notificationsVisibility) { if (this.notificationsVisibility) {
if (msg.type === 'error') this.toasterService.error(msg.message); if (msg.type === 'error') this.toasterService.error(msg.message);

View File

@ -11,6 +11,8 @@ export class MapSettingsService {
public logConsoleSubject = new Subject<boolean>(); public logConsoleSubject = new Subject<boolean>();
public mapRenderedEmitter = new EventEmitter<boolean>(); public mapRenderedEmitter = new EventEmitter<boolean>();
public integrateLinkLabelsToLinks: boolean = true;
constructor() { constructor() {
this.isLayerNumberVisible = localStorage.getItem('layersVisibility') === 'true' ? true : false; this.isLayerNumberVisible = localStorage.getItem('layersVisibility') === 'true' ? true : false;
} }