diff --git a/src/app/cartography/components/draggable-selection/draggable-selection.component.ts b/src/app/cartography/components/draggable-selection/draggable-selection.component.ts index 988ac140..e5a06236 100644 --- a/src/app/cartography/components/draggable-selection/draggable-selection.component.ts +++ b/src/app/cartography/components/draggable-selection/draggable-selection.component.ts @@ -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, diff --git a/src/app/components/project-map/project-map-menu/project-map-menu.component.ts b/src/app/components/project-map/project-map-menu/project-map-menu.component.ts index f016b900..8ce64d11 100644 --- a/src/app/components/project-map/project-map-menu/project-map-menu.component.ts +++ b/src/app/components/project-map/project-map-menu/project-map-menu.component.ts @@ -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); } diff --git a/src/app/components/project-map/project-map.component.ts b/src/app/components/project-map/project-map.component.ts index 46ecec90..a6c63377 100644 --- a/src/app/components/project-map/project-map.component.ts +++ b/src/app/components/project-map/project-map.component.ts @@ -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() {