AW-6046 Angular 17
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import { Component, OnDestroy, OnInit, Input } from '@angular/core';
|
||||
import { PinchZoom } from 'ol/interaction';
|
||||
import { MapComponent } from '../map.component';
|
||||
|
||||
@Component({
|
||||
selector: 'aol-interaction-pinchzoom',
|
||||
template: '',
|
||||
})
|
||||
export class PinchZoomInteractionComponent implements OnInit, OnDestroy {
|
||||
@Input()
|
||||
duration: number;
|
||||
@Input()
|
||||
constrainResolution: boolean;
|
||||
|
||||
instance: PinchZoom;
|
||||
|
||||
constructor(private map: MapComponent) {}
|
||||
|
||||
ngOnInit() {
|
||||
this.instance = new PinchZoom(this);
|
||||
this.map.instance.addInteraction(this.instance);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.map.instance.removeInteraction(this.instance);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user