mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: format
This commit is contained in:
@@ -2,44 +2,56 @@
|
||||
import { _resolveAnimationCurve } from "../animation";
|
||||
import lazy from "../../utils/lazy";
|
||||
|
||||
const _defaultInterpolator = lazy(() => new android.view.animation.AccelerateDecelerateInterpolator());
|
||||
const _defaultInterpolator = lazy(
|
||||
() => new android.view.animation.AccelerateDecelerateInterpolator()
|
||||
);
|
||||
|
||||
export module AndroidTransitionType {
|
||||
export const enter = "enter";
|
||||
export const exit = "exit";
|
||||
export const popEnter = "popEnter";
|
||||
export const popExit = "popExit";
|
||||
export const enter = "enter";
|
||||
export const exit = "exit";
|
||||
export const popEnter = "popEnter";
|
||||
export const popExit = "popExit";
|
||||
}
|
||||
|
||||
let transitionId = 0;
|
||||
export class Transition {
|
||||
private _duration: number;
|
||||
private _interpolator: android.view.animation.Interpolator;
|
||||
private _id: number;
|
||||
private _duration: number;
|
||||
private _interpolator: android.view.animation.Interpolator;
|
||||
private _id: number;
|
||||
|
||||
constructor(duration: number, curve: any) {
|
||||
this._duration = duration;
|
||||
this._interpolator = curve ? _resolveAnimationCurve(curve) : _defaultInterpolator();
|
||||
this._id = transitionId++;
|
||||
}
|
||||
constructor(duration: number, curve: any) {
|
||||
this._duration = duration;
|
||||
this._interpolator = curve
|
||||
? _resolveAnimationCurve(curve)
|
||||
: _defaultInterpolator();
|
||||
this._id = transitionId++;
|
||||
}
|
||||
|
||||
public getDuration(): number {
|
||||
return this._duration;
|
||||
}
|
||||
public getDuration(): number {
|
||||
return this._duration;
|
||||
}
|
||||
|
||||
public getCurve(): android.view.animation.Interpolator {
|
||||
return this._interpolator;
|
||||
}
|
||||
public getCurve(): android.view.animation.Interpolator {
|
||||
return this._interpolator;
|
||||
}
|
||||
|
||||
public animateIOSTransition(containerView: any, fromView: any, toView: any, operation: any, completion: (finished: boolean) => void): void {
|
||||
throw new Error("Abstract method call");
|
||||
}
|
||||
public animateIOSTransition(
|
||||
containerView: any,
|
||||
fromView: any,
|
||||
toView: any,
|
||||
operation: any,
|
||||
completion: (finished: boolean) => void
|
||||
): void {
|
||||
throw new Error("Abstract method call");
|
||||
}
|
||||
|
||||
public createAndroidAnimator(transitionType: string): android.animation.Animator {
|
||||
throw new Error("Abstract method call");
|
||||
}
|
||||
public createAndroidAnimator(
|
||||
transitionType: string
|
||||
): android.animation.Animator {
|
||||
throw new Error("Abstract method call");
|
||||
}
|
||||
|
||||
public toString(): string {
|
||||
return `Transition@${this._id}`;
|
||||
}
|
||||
public toString(): string {
|
||||
return `Transition@${this._id}`;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user