Merge pull request #3618 from NativeScript/angular-animations

Expose some private APIs used in the angular animations
This commit is contained in:
Panayot Cankov
2017-02-09 13:41:20 +02:00
committed by GitHub
2 changed files with 10 additions and 0 deletions

View File

@ -553,11 +553,18 @@ export class CssAnimationProperty<T extends Style, U> {
public readonly keyframe: string;
public readonly defaultValueKey: symbol;
private static properties: { [cssName: string]: CssAnimationProperty<any, any> } = {};
public _valueConverter?: (value: string) => any;
constructor(private options: definitions.CssAnimationPropertyOptions<T, U>) {
const { valueConverter, equalityComparer, valueChanged, defaultValue } = options;
const propertyName = options.name;
this.name = propertyName;
CssAnimationProperty.properties[options.cssName || propertyName] = this;
this._valueConverter = options.valueConverter;
const cssName = "css:" + (options.cssName || propertyName);
this.cssName = cssName;

View File

@ -236,6 +236,9 @@ declare module "ui/core/properties" {
readonly keyframe: string;
public register(cls: { prototype: T }): void;
public _valueConverter?: (value: string) => any;
public static _getByCssName(name: string): CssAnimationProperty<any, any>;
}
export class Property<T extends ViewBase, U> implements TypedPropertyDescriptor<U> {