Add callback to olx.view.FitOptions. (#23199)

* Add `callback` to `olx.view.FitOptions`. See http://openlayers.org/en/latest/apidoc//ol.View.html#fit

* Use existing AnimateCallback type
This commit is contained in:
Matthias Dailey
2018-01-25 16:42:33 -05:00
committed by Andy
parent 9dec8df964
commit 45457bbbc9
2 changed files with 5 additions and 0 deletions

View File

@@ -14618,6 +14618,7 @@ declare module olx {
maxZoom?: number;
duration?: number;
easing?: ((t: number) => number);
callback?: olx.animation.AnimateCallback;
}
}

View File

@@ -399,6 +399,10 @@ let view: ol.View = new ol.View({
voidValue = view.setMaxZoom(numberValue);
voidValue = view.setMinZoom(numberValue);
voidValue = view.fit(simpleGeometry);
voidValue = view.fit(extent);
voidValue = view.fit(extent, {callback: () => {}});
voidValue = view.fit(extent, {callback: (animationCompleted: boolean) => {}});
//
// ol.layer.Base