Skip to content

Commit

Permalink
WIP on displacement highlight sync
Browse files Browse the repository at this point in the history
  • Loading branch information
artisticlight committed Dec 12, 2024
1 parent 1d666c8 commit 9f0931a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/app/components/map/map.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,20 +102,21 @@ export class MapComponent implements OnInit, OnDestroy {
) {}

ngOnInit(): void {

this.subs.add(
this.mapService.selectedSarviewEvent$.pipe(
filter(id => !!id)
).subscribe(
id => this.selectedSarviewEvent = this.sarviewsEvents?.find(event => event?.event_id === id)
));
this.mapService.selectedSarviewEvent$.pipe(
filter(id => !!id)
).subscribe(
id => this.selectedSarviewEvent = this.sarviewsEvents?.find(event => event?.event_id === id)
)
);

this.subs.add(
this.store$.select(scenesStore.getSelectedScene).subscribe(
scene => this.selectedScene = scene
)
);


this.subs.add(
this.screenSize.breakpoint$.subscribe(
breakpoint => this.breakpoint = breakpoint
Expand Down Expand Up @@ -255,7 +256,7 @@ export class MapComponent implements OnInit, OnDestroy {
}
})
this.pointHistoryService.selectedPoint = pointIndex;
console.log('map selected pointIndex:', pointIndex);
console.log('map selected point history:', this.pointHistoryService.getHistory());

this.mapService.loadPolygonFrom(wktRepresentation.toString())
})
Expand Down Expand Up @@ -290,7 +291,6 @@ export class MapComponent implements OnInit, OnDestroy {
const newMode = successful ?
models.MapInteractionModeType.EDIT :
models.MapInteractionModeType.NONE;

this.onNewInteractionMode(newMode);
}

Expand Down
8 changes: 5 additions & 3 deletions src/app/services/map/map.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ export class MapService {
if (this.legacyAreaFormat.isValid(polygon)) {
polygon = this.legacyAreaFormat.toWkt(polygon);
}

return this.loadWKT(polygon);
}

Expand All @@ -225,7 +224,6 @@ export class MapService {
polygon,
this.epsg()
);

this.setDrawFeature(features);
} catch (e) {
didLoad = false;
Expand Down Expand Up @@ -519,7 +517,11 @@ export class MapService {
});
this.timeseriesClick.on('select', e => {
e.target.getFeatures().forEach(
feature => { this.pointHistoryService.passDraw = true; this.newSelectedDisplacement$.next(feature.get('point')) }
feature => {
this.pointHistoryService.passDraw = true;
this.newSelectedDisplacement$.next(feature.get('point'));
console.log('map.service this.timeseriesClick feature:', feature);
}
);
});

Expand Down

0 comments on commit 9f0931a

Please sign in to comment.