Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
attribution: {
collapsed: true
}
}
});
public view = {
center: [-72, 47.2],
zoom: 5
};
public workspaceStore = new WorkspaceStore([]);
public selectedWorkspace$: Observable;
public actionbarMode = ActionbarMode.Dock;
public scrollBehavior = EntityTableScrollBehavior.Instant;
constructor(
private languageService: LanguageService,
private dataSourceService: DataSourceService,
private layerService: LayerService
) {}
ngOnInit() {
this.selectedWorkspace$ = this.workspaceStore.stateView
.firstBy$(
(record: EntityRecord) => record.state.selected === true
)
.pipe(
map((record: EntityRecord) => {
get actionbarMode(): ActionbarMode {
const media = this.mediaService.media$.value;
const orientation = this.mediaService.orientation$.value;
if (media === Media.Desktop && orientation === MediaOrientation.Landscape) {
return ActionbarMode.Dock;
}
return ActionbarMode.Overlay;
}