Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade hslayers 2 #6

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Monitor if weather panel is active and hide accordingly
raitisbe committed Aug 19, 2020
commit 173835d6a2843c91e7a6caed25386c2451e0cd15
6 changes: 6 additions & 0 deletions weather.component.ts
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ import { transform } from 'ol/proj';
import { Feature } from 'ol';
import { HsDialogContainerService } from 'hslayers-ng/components/layout/dialogs/dialog-container.service';
import { InfoDialogComponent } from './info-dialog.component';
import {HsLayoutService} from 'hslayers-ng/components/layout/layout.service';
import { HsCesiumService } from 'hslayers-ng/components/hscesium/hscesium.service';
import {HttpClient} from '@angular/common/http';

@@ -29,6 +30,7 @@ export class WeatherComponent
private HsDialogContainerService: HsDialogContainerService,
private HsCesiumService: HsCesiumService,
private HttpClient: HttpClient,
private HsLayoutService: HsLayoutService,
HsConfig: HsConfig
) {
HsConfig.default_layers.push(WeatherService.createLayer());
@@ -59,6 +61,10 @@ export class WeatherComponent
});
}

isVisible() {
return this.HsLayoutService.panelVisible('weather');
}

getCrossings(serviceName, name) {
this.loading = true;
this.WeatherService.getCrossings(this.WeatherService.points, serviceName, name, function () {
2 changes: 1 addition & 1 deletion weather.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="card card- mainpanel">
<div [hidden]="!isVisible()" class="card card- mainpanel">
<div class="card-header" i18n>Weather watcher
<button type="button" class="close" (click)="Core.closePanel(this)">
<span aria-hidden="true"></span>