Files
Nathan Walker ac7f041dea fix(core): AndroidTransitionType symbol export handling (#9252)
BREAKING CHANGE:

AndroidTransitionType is now a static member of the Transition class.

BEFORE:

```
import { AndroidTransitionType } from '@nativescript/core/ui/transition';
```

AFTER:

```
import { Transition } from '@nativescript/core';
Transition.AndroidTransitionType.enter; // etc.
```
2021-02-27 13:16:39 -08:00

34 lines
915 B
TypeScript

let transitionId = 0;
export class Transition {
static AndroidTransitionType = {};
private _duration: number;
private _curve: UIViewAnimationCurve;
private _id: number;
constructor(duration: number, curve: UIViewAnimationCurve = UIViewAnimationCurve.EaseInOut) {
this._duration = duration ? duration / 1000 : 0.35;
this._curve = curve;
this._id = transitionId++;
}
public getDuration(): number {
return this._duration;
}
public getCurve(): UIViewAnimationCurve {
return this._curve;
}
public animateIOSTransition(containerView: UIView, fromView: UIView, toView: UIView, operation: UINavigationControllerOperation, completion: (finished: boolean) => void): void {
throw new Error('Abstract method call');
}
public createAndroidAnimator(transitionType: string): any {
throw new Error('Abstract method call');
}
public toString(): string {
return `Transition@${this._id}`;
}
}