diff --git a/tns-core-modules/ui/core/properties.ts b/tns-core-modules/ui/core/properties.ts index 46b425874..1d1d2d304 100644 --- a/tns-core-modules/ui/core/properties.ts +++ b/tns-core-modules/ui/core/properties.ts @@ -553,11 +553,18 @@ export class CssAnimationProperty { public readonly keyframe: string; public readonly defaultValueKey: symbol; + private static properties: { [cssName: string]: CssAnimationProperty } = {}; + + public _valueConverter?: (value: string) => any; + constructor(private options: definitions.CssAnimationPropertyOptions) { 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; diff --git a/tns-core-modules/ui/definitions.d.ts b/tns-core-modules/ui/definitions.d.ts index 814bf841e..a13458024 100644 --- a/tns-core-modules/ui/definitions.d.ts +++ b/tns-core-modules/ui/definitions.d.ts @@ -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; } export class Property implements TypedPropertyDescriptor {