mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-18 22:01:42 +08:00
Merge pull request #3618 from NativeScript/angular-animations
Expose some private APIs used in the angular animations
This commit is contained in:
@ -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;
|
||||
|
||||
|
3
tns-core-modules/ui/definitions.d.ts
vendored
3
tns-core-modules/ui/definitions.d.ts
vendored
@ -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> {
|
||||
|
Reference in New Issue
Block a user