mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-06-16 05:48:10 +00:00
Initial implementation
This commit is contained in:
@ -4,6 +4,7 @@ import { Project } from '../../../../../models/project';
|
||||
import { Drawing } from '../../../../../cartography/models/drawing';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { TextEditorDialogComponent } from '../../../drawings-editors/text-editor/text-editor.component';
|
||||
import { Label } from '../../../../../cartography/models/label';
|
||||
|
||||
@Component({
|
||||
selector: 'app-edit-text-action',
|
||||
@ -13,6 +14,7 @@ export class EditTextActionComponent implements OnInit {
|
||||
@Input() server: Server;
|
||||
@Input() project: Project;
|
||||
@Input() drawing: Drawing;
|
||||
@Input() label: Label;
|
||||
|
||||
constructor(private dialog: MatDialog) {}
|
||||
|
||||
@ -27,5 +29,6 @@ export class EditTextActionComponent implements OnInit {
|
||||
instance.server = this.server;
|
||||
instance.project = this.project;
|
||||
instance.drawing = this.drawing;
|
||||
instance.label = this.label;
|
||||
}
|
||||
}
|
||||
|
@ -14,10 +14,11 @@
|
||||
[drawing]="drawings[0]"
|
||||
></app-edit-style-action>
|
||||
<app-edit-text-action
|
||||
*ngIf="drawings.length===1 && hasTextCapabilities"
|
||||
*ngIf="drawings.length===1 && hasTextCapabilities || labels.length===1"
|
||||
[server]="server"
|
||||
[project]="project"
|
||||
[drawing]="drawings[0]"
|
||||
[label]="labels[0]"
|
||||
></app-edit-text-action>
|
||||
<app-move-layer-up-action
|
||||
*ngIf="!projectService.isReadOnly(project) && (drawings.length || nodes.length)"
|
||||
@ -60,7 +61,7 @@
|
||||
[link]="links[0]"
|
||||
></app-suspend-link-action>
|
||||
<app-delete-action
|
||||
*ngIf="!projectService.isReadOnly(project)"
|
||||
*ngIf="!projectService.isReadOnly(project) && (drawings.length>0 || nodes.length>0 || links.length>0)"
|
||||
[server]="server"
|
||||
[nodes]="nodes"
|
||||
[drawings]="drawings"
|
||||
|
Reference in New Issue
Block a user