mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-05-01 08:20:00 +00:00
This commit is contained in:
parent
2a96a6b601
commit
c0cff3a6db
@ -383,6 +383,16 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
|
|
||||||
Mousetrap.bind('del', (event: Event) => {
|
Mousetrap.bind('del', (event: Event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
this.deleteItems();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
deleteItems() {
|
||||||
|
this.bottomSheet.open(ConfirmationBottomSheetComponent);
|
||||||
|
let bottomSheetRef = this.bottomSheet._openedBottomSheetRef;
|
||||||
|
bottomSheetRef.instance.message = 'Do you want to delete all selected objects?';
|
||||||
|
const bottomSheetSubscription = bottomSheetRef.afterDismissed().subscribe((result: boolean) => {
|
||||||
|
if (result) {
|
||||||
const selected = this.selectionManager.getSelected();
|
const selected = this.selectionManager.getSelected();
|
||||||
|
|
||||||
selected
|
selected
|
||||||
@ -393,6 +403,7 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
|||||||
this.toasterService.success('Node has been deleted');
|
this.toasterService.success('Node has been deleted');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user