Add hideShowLayerValues flag for fm-map-map
All checks were successful
FarmMaps/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -92,6 +92,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
public noContent = false;
|
||||
public overrideSelectedItemLayer = false;
|
||||
public overrideOverlayLayers = false;
|
||||
public hideShowLayerValues = false;
|
||||
public const
|
||||
public dataLayerSlideValue = 50;
|
||||
public dataLayerSlideEnabled = false;
|
||||
private visibleAreaBottom = 0;
|
||||
@@ -116,6 +118,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
const params = route.snapshot.data["fm-map-map"];
|
||||
this.overrideSelectedItemLayer = params["overrideSelectedItemlayer"] ? params["overrideSelectedItemlayer"] : false;
|
||||
this.overrideOverlayLayers = params["overrideOverlayLayers"] ? params["overrideOverlayLayers"] : false;
|
||||
this.hideShowLayerValues = params["hideShowLayerValues"] ? params["hideShowLayerValues"] : false;
|
||||
}
|
||||
this.querySub = this.query$.pipe(skip(1), withLatestFrom(this.mapState$)).subscribe(([query, mapState]) => {
|
||||
if (query && query.querystate) {
|
||||
@@ -297,11 +300,13 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
|
||||
normalizeMapState(mapState: IMapState): IMapState {
|
||||
if (!mapState) return null;
|
||||
return {zoom: this.round(mapState.zoom,0),
|
||||
return {
|
||||
zoom: this.round(mapState.zoom, 0),
|
||||
rotation: this.round(mapState.rotation, 2),
|
||||
xCenter: this.round(mapState.xCenter, 5),
|
||||
yCenter: this.round(mapState.yCenter, 5),
|
||||
baseLayerCode: mapState.baseLayerCode };
|
||||
baseLayerCode: mapState.baseLayerCode
|
||||
};
|
||||
}
|
||||
|
||||
serializeMapState(mapState: IMapState): string {
|
||||
@@ -472,11 +477,13 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
}
|
||||
|
||||
handleShowLayerValues(event: MouseEvent) {
|
||||
if (this.hideShowLayerValues) {
|
||||
event.stopPropagation();
|
||||
this.zone.run(() => {
|
||||
this.store.dispatch(new mapActions.ToggleLayerValuesEnabled());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
handleOnDownload(event) {
|
||||
|
||||
|
Reference in New Issue
Block a user