Skip to content

Commit

Permalink
feat(wip): timeseries search type
Browse files Browse the repository at this point in the history
  • Loading branch information
tylercchase committed Jul 16, 2024
1 parent 15eca01 commit c2fed26
Show file tree
Hide file tree
Showing 17 changed files with 52 additions and 264 deletions.
4 changes: 3 additions & 1 deletion src/app/components/header/header.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ import { SarviewsEventTypeSelectorModule } from '@components/shared/selectors/sa
import { Hyp3UrlModule } from '@components/shared/hyp3-url/hyp3-url.module';
import { SharedModule } from "@shared";
import { LanguageSelectorModule } from "@components/shared/selectors/language-selector/language-selector.module";
import { BurstSelectorModule } from '@components/shared/selectors/burst-selector';

@NgModule({
declarations: [
Expand Down Expand Up @@ -100,7 +101,8 @@ import { LanguageSelectorModule } from "@components/shared/selectors/language-se
Hyp3UrlModule,
SharedModule,
LanguageSelectorModule,
OnDemandUserSelectorModule
OnDemandUserSelectorModule,
BurstSelectorModule
],
exports: [
HeaderComponent
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="breadcrumb scene-selector" [class.scene-selector]="breakpoint === breakpoints.FULL"
[class.medium-scene-selector]="breakpoint === breakpoints.MEDIUM"
[class.small-scene-selector]="breakpoint === breakpoints.SMALL">
<app-master-scene-selector></app-master-scene-selector>
<app-burst-selector></app-burst-selector>
</div>

<div class="breadcrumb search-button-layout">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</div>
</div>

<div *ngIf="searchType === searchTypes.DATASET || searchType === searchTypes.SBAS" class="fx-empty group-margin">
<div *ngIf="searchType === searchTypes.DATASET || searchType === searchTypes.SBAS || searchType === searchTypes.TIMESERIES" class="fx-empty group-margin">
<div class="fx-row-center button-group-label">
<label>{{ 'AREA_OF_INTEREST' | translate }}</label>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/app/components/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { StyleLike } from 'ol/style/Style';
import { Feature } from 'ol';
import Geometry from 'ol/geom/Geometry';
import { MatDialog } from '@angular/material/dialog';
import { TimeseriesComponent} from '../../dialogs/timeseries'

enum FullscreenControls {
MAP = 'Map',
Expand Down Expand Up @@ -282,7 +281,7 @@ export class MapComponent implements OnInit, OnDestroy {
this.netcdfService.getTimeSeries(mousePos).pipe(
first()
).subscribe(
response => this.dialog.open(TimeseriesComponent, {data: response})
response => console.log(response)
);
}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
<mat-icon class="draw-icon">place</mat-icon>
{{ 'PLACE_A_POINT' | translate }}
</button>
@if(searchType !== searchTypes.TIMESERIES) {

<button mat-menu-item
<button mat-menu-item
(click)="onLineStringSelected()"
[value]="types.LINESTRING"
class="control-button mat-menu-item">
Expand Down Expand Up @@ -78,4 +79,5 @@
{{'UPLOAD_GEOSPATIAL_FILE' | translate}}

</button>
}
</mat-menu>
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import { Store } from '@ngrx/store';
import { AppState } from '@store';
import * as mapStore from '@store/map';
import * as uiStore from '@store/ui';
import * as searchStore from '@store/search';

import { ScreenSizeService } from '@services';
import { MapDrawModeType, MapInteractionModeType, Breakpoints } from '@models';
import { MapDrawModeType, MapInteractionModeType, Breakpoints, SearchType } from '@models';

@Component({
selector: 'app-draw-selector',
Expand All @@ -20,6 +21,8 @@ export class DrawSelectorComponent implements OnInit, OnDestroy {
private subs = new SubSink();

public breakpoint: Breakpoints;
public searchType: SearchType;
public searchTypes = SearchType;
public breakpoints = Breakpoints;

constructor(
Expand All @@ -39,6 +42,12 @@ export class DrawSelectorComponent implements OnInit, OnDestroy {
breakpoint => this.breakpoint = breakpoint
)
);
this.subs.add(
this.store$.select(searchStore.getSearchType).subscribe(
searchType => this.searchType = searchType
)
);

}

public onNewDrawMode(mode: MapDrawModeType): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,6 @@
<mat-icon class="interaction-icon">draw</mat-icon>
</mat-button-toggle>

<mat-button-toggle
(click)="onTimeseriesSelected()"
[value]="types.TIMERSERIES"
class="control-mat-button-toggle"
[matTooltip]="interaction === types.TIMERSERIES ? ('STOP_DRAWING'| translate) : ('DRAW_NEW_AREA_OF_INTEREST'| translate)">
<mat-icon class="interaction-icon">stacks</mat-icon>
</mat-button-toggle>

<mat-button-toggle
(click)="onClearSelected()"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ export class InteractionSelectorComponent implements OnInit, OnDestroy {
this.interaction === MapInteractionModeType.DRAW ? MapInteractionModeType.NONE : MapInteractionModeType.DRAW
)

public onTimeseriesSelected =
() => this.onNewInteractionMode(
this.interaction === MapInteractionModeType.TIMERSERIES ? MapInteractionModeType.NONE : MapInteractionModeType.TIMERSERIES
)
public onEditSelected =
() => this.onNewInteractionMode(
this.interaction === MapInteractionModeType.EDIT ? MapInteractionModeType.NONE : MapInteractionModeType.EDIT
Expand Down
3 changes: 0 additions & 3 deletions src/app/dialogs/timeseries/index.ts

This file was deleted.

51 changes: 0 additions & 51 deletions src/app/dialogs/timeseries/timeseries.component.html

This file was deleted.

42 changes: 0 additions & 42 deletions src/app/dialogs/timeseries/timeseries.component.scss

This file was deleted.

147 changes: 0 additions & 147 deletions src/app/dialogs/timeseries/timeseries.component.ts

This file was deleted.

4 changes: 4 additions & 0 deletions src/app/models/search.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type FilterType =
BaselineFiltersType |
CustomProductFiltersType |
SbasFiltersType |
TimeseriesFiltersType |
SarviewsFiltersType;

export interface ListFiltersType {
Expand Down Expand Up @@ -98,3 +99,6 @@ export interface SarviewsFiltersType {
pinnedProductIDs: string[];
selectedEventID: string;
}
export interface TimeseriesFiltersType {
fullBurstIDs: string[];
}
Loading

0 comments on commit c2fed26

Please sign in to comment.