Skip to content

Commit

Permalink
wip: add cog visualiser
Browse files Browse the repository at this point in the history
  • Loading branch information
MAudelGisaia committed Feb 11, 2025
1 parent 9a623f3 commit 66d2aee
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 12 deletions.
6 changes: 5 additions & 1 deletion src/app/components/arlas-map/arlas-map.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@
<arlas-rasters-manager></arlas-rasters-manager>
</div>

<div class="arlas-cog-visualisation-manager">
<div
[class.arlas-cog-visualisation-manager--tight]="!wuiMapService.coordinatesHaveSpace && !wuiMapService.timeLineIsOpen"
[class.arlas-cog-visualisation-manager--timeline-open]="wuiMapService.timeLineIsOpen && wuiMapService.coordinatesHaveSpace"
[class.arlas-cog-visualisation-manager--full]="wuiMapService.timeLineIsOpen && !wuiMapService.coordinatesHaveSpace"
class="arlas-cog-visualisation-manager">
<arlas-cog-visualisation-manager></arlas-cog-visualisation-manager>
</div>

Expand Down
23 changes: 16 additions & 7 deletions src/app/components/arlas-map/arlas-map.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,22 @@
);
right: $sm-spacing;
z-index: 2;

&--tight {
bottom: calc(
$sm-spacing + $map-scale-height + $map-scale-height
)!important;
}
&--timeline-open {
bottom: calc(
$sm-spacing + $map-scale-height + $sm-spacing + $timeline-height
)!important;
}
&--full {
bottom: calc(
$sm-spacing + $map-scale-height + $map-scale-height + $sm-spacing + $timeline-height
)!important;
}
}

.arlas-map-action-container {
Expand Down Expand Up @@ -129,10 +145,3 @@
}
}

@media (max-width: 838px) {
.arlas-cog-visualisation-manager {
bottom: calc(
$sm-spacing + $map-scale-height + $map-scale-height
)!important;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@
.arlas-map {
::ng-deep.arlas-map-action,
::ng-deep.arlas-map-settings,
::ng-deep.arlas-rasters-manager {
::ng-deep.arlas-rasters-manager,
::ng-deep .arlas-cog-visualisation-manager {
right: calc($result-list-width + $sm-spacing) !important;
}
::ng-deep.aoi-dimensions {
Expand Down Expand Up @@ -264,7 +265,8 @@
.arlas-map {
::ng-deep.arlas-map-action,
::ng-deep.arlas-map-settings,
::ng-deep.arlas-rasters-manager {
::ng-deep.arlas-rasters-manager,
::ng-deep .arlas-cog-visualisation-manager{
right: calc($preview-result-list-width + $sm-spacing) !important;
}
::ng-deep.aoi-dimensions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export class ArlasWuiRootComponent<L, S, M> implements OnInit, AfterViewInit, On

/** init from url */
this.showTimeline = getParamValue('to') === 'true';

this.mapService.timeLineIsOpen = this.showTimeline;
let wasTabSelected = getParamValue('at') !== null;
this.analyticsService.tabChange.subscribe(tab => {
// If there is a change in the state of the analytics (open/close), resize
Expand Down Expand Up @@ -311,6 +311,7 @@ export class ArlasWuiRootComponent<L, S, M> implements OnInit, AfterViewInit, On

public toggleTimeline() {
this.showTimeline = !this.showTimeline;
this.mapService.timeLineIsOpen = this.showTimeline;
const queryParams = { ...this.activatedRoute.snapshot.queryParams};
queryParams['to'] = this.showTimeline + '';
this.router.navigate([], { replaceUrl: true, queryParams: queryParams });
Expand Down
4 changes: 3 additions & 1 deletion src/app/services/map.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

import { Injectable } from '@angular/core';
import { ElementIdentifier, FeatureRenderMode, MapContributor } from 'arlas-web-contributors';
import { ArlasMapComponent, AbstractArlasMapService, ArlasMapFrameworkService } from 'arlas-map';
import { AbstractArlasMapService, ArlasMapComponent, ArlasMapFrameworkService } from 'arlas-map';

export interface FeatureHover {
isleaving: boolean;
elementidentifier: ElementIdentifier;
Expand All @@ -42,6 +43,7 @@ export class ArlasWuiMapService<L, S, M> {
public featuresToSelect: Array<ElementIdentifier> = [];

public coordinatesHaveSpace: boolean;
public timeLineIsOpen: boolean;

public constructor(public mapService: ArlasMapFrameworkService<L, S, M>,
public mapLogicService: AbstractArlasMapService<L, S, M>) { }
Expand Down

0 comments on commit 66d2aee

Please sign in to comment.