Fix for local server

This commit is contained in:
Piotr Pekala 2019-03-25 06:25:54 -07:00
parent 36fb802454
commit 4c681f5097
2 changed files with 6 additions and 2 deletions

View File

@ -27,12 +27,14 @@
[drawings]="drawings"
></app-move-layer-down-action>
<app-start-capture-action
*ngIf="!projectService.isReadOnly(project) && drawings.length===0 && nodes.length===0 && links.length===1"
*ngIf="!projectService.isReadOnly(project) && isLocalServer
&& drawings.length===0 && nodes.length===0 && links.length===1"
[server]="server"
[link]="links[0]"
></app-start-capture-action>
<app-stop-capture-action
*ngIf="!projectService.isReadOnly(project) && drawings.length===0 && nodes.length===0 && links.length===1"
*ngIf="!projectService.isReadOnly(project) && isLocalServer
&& drawings.length===0 && nodes.length===0 && links.length===1"
[server]="server"
[link]="links[0]"
></app-stop-capture-action>

View File

@ -31,6 +31,7 @@ export class ContextMenuComponent implements OnInit {
links: Link[] = [];
hasTextCapabilities: boolean = false;
isLocalServer: boolean = false;
constructor(
private sanitizer: DomSanitizer,
@ -40,6 +41,7 @@ export class ContextMenuComponent implements OnInit {
ngOnInit() {
this.setPosition(0, 0);
this.isLocalServer = this.server.location === 'local';
}
public setPosition(top: number, left: number) {