mirror of
https://github.com/GNS3/gns3-web-ui.git
synced 2025-04-18 23:36:53 +00:00
Resolve global lock/unlock functionality handled by locally
This commit is contained in:
parent
fcfcb7566d
commit
0ed26e3621
@ -52,8 +52,8 @@ export class DraggableSelectionComponent implements OnInit, OnDestroy {
|
||||
|
||||
this.mapSettingsSubscription = this.mapSettingsService.isMapLocked.subscribe((value) => {
|
||||
this.isMapLocked = value;
|
||||
console.log('locl value---',this.isMapLocked)
|
||||
});
|
||||
|
||||
this.start = merge(
|
||||
this.nodesWidget.draggable.start,
|
||||
this.drawingsWidget.draggable.start,
|
||||
|
@ -160,8 +160,8 @@ export class ProjectMapMenuComponent implements OnInit, OnDestroy {
|
||||
public changeLockValue() {
|
||||
this.isLocked = !this.isLocked;
|
||||
this.mapSettingsService.changeMapLockValue(this.isLocked);
|
||||
}
|
||||
|
||||
}
|
||||
public uploadImageFile(event) {
|
||||
this.readImageFile(event.target);
|
||||
}
|
||||
|
@ -139,6 +139,8 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
@ViewChild('topologySummaryContainer', { read: ViewContainerRef }) topologySummaryContainer: ViewContainerRef;
|
||||
|
||||
private projectMapSubscription: Subscription = new Subscription();
|
||||
private mapSettingsSubscription: Subscription;
|
||||
private isMapLocked: boolean = false;
|
||||
|
||||
constructor(
|
||||
private route: ActivatedRoute,
|
||||
@ -217,6 +219,23 @@ export class ProjectMapComponent implements OnInit, OnDestroy {
|
||||
? (this.isLightThemeEnabled = true)
|
||||
: (this.isLightThemeEnabled = false);
|
||||
});
|
||||
|
||||
this.mapSettingsSubscription = this.mapSettingsService.isMapLocked.subscribe((value) => {
|
||||
this.isMapLocked = value;
|
||||
this.all_lock_Nodes()
|
||||
console.log('lock value---',this.isMapLocked)
|
||||
});
|
||||
}
|
||||
|
||||
all_lock_Nodes(){
|
||||
this.nodes.forEach((node) => {
|
||||
node.locked = this.isMapLocked;
|
||||
this.nodesDataSource.update(node);
|
||||
});
|
||||
this.drawings.forEach((drawing) => {
|
||||
drawing.locked = !drawing.locked;
|
||||
this.drawingsDataSource.update(drawing);
|
||||
});
|
||||
}
|
||||
|
||||
getSettings() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user