Fix request canceling
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<li class="border-top pt-1 pb-1 value" *ngFor="let layerValue of layers">
|
||||
<div>{{layerValue.layerName}}</div>
|
||||
<div>{{layerValue.date|date}}</div>
|
||||
<div><span>{{layerValue.quantity}}</span> <span>{{layerValue.value}}</span><span>{{layerValue.unit}}</span></div>
|
||||
<div><span class="mr-1">{{layerValue.quantity}}</span> <span class="mr-1 font-weight-bold">{{layerValue.value}}</span><span>{{layerValue.unit}}</span></div>
|
||||
</li>
|
||||
</ul>
|
||||
<ng-template #no_data>
|
||||
|
@@ -5,8 +5,8 @@ import * as mapReducers from '../../../reducers/map.reducer';
|
||||
import * as mapActions from '../../../actions/map.actions';
|
||||
import { MapComponent } from 'ngx-openlayers';
|
||||
import { ILayervalue } from '../../../models/layer.value';
|
||||
import { Observable,interval } from 'rxjs';
|
||||
import { debounce } from 'rxjs/operators';
|
||||
import { Observable,interval,Subject } from 'rxjs';
|
||||
import { debounce, throttle } from 'rxjs/operators';
|
||||
import { toLonLat } from 'ol/proj';
|
||||
import { toStringHDMS } from 'ol/coordinate';
|
||||
import { ClipboardService } from 'ngx-clipboard'
|
||||
@@ -37,12 +37,15 @@ export class LayerValuesComponent implements OnInit,AfterViewInit {
|
||||
|
||||
}
|
||||
|
||||
moveEndSubject = new Subject<any>();
|
||||
|
||||
ngAfterViewInit():void {
|
||||
this.offsetY$ = this.containerRef.nativeElement.offsetTop;
|
||||
this.offsetX$ = this.containerRef.nativeElement.offsetLeft;
|
||||
this.map.instance.on('moveend', () => {
|
||||
this.updateValuesLocation();
|
||||
this.moveEndSubject.next({});
|
||||
});
|
||||
this.moveEndSubject.pipe(throttle(ev => interval(100))).subscribe(() => this.updateValuesLocation());
|
||||
}
|
||||
|
||||
updateValuesLocation() {
|
||||
|
Reference in New Issue
Block a user