mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Fixed tslint errors
This commit is contained in:
@ -6,7 +6,6 @@ import * as animationModule from "ui/animation";
|
|||||||
import * as colorModule from "color";
|
import * as colorModule from "color";
|
||||||
import * as enums from "ui/enums";
|
import * as enums from "ui/enums";
|
||||||
import * as frame from "ui/frame";
|
import * as frame from "ui/frame";
|
||||||
import * as trace from "trace";
|
|
||||||
|
|
||||||
export class ViewModel extends observable.Observable {
|
export class ViewModel extends observable.Observable {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -3,7 +3,7 @@ import {
|
|||||||
AnimationBase, Properties, PropertyAnimation, CubicBezierAnimationCurve, AnimationPromise,
|
AnimationBase, Properties, PropertyAnimation, CubicBezierAnimationCurve, AnimationPromise,
|
||||||
opacityProperty, backgroundColorProperty, rotateProperty,
|
opacityProperty, backgroundColorProperty, rotateProperty,
|
||||||
translateXProperty, translateYProperty,
|
translateXProperty, translateYProperty,
|
||||||
scaleXProperty, scaleYProperty, Color, traceWrite, traceEnabled, traceCategories, unsetValue
|
scaleXProperty, scaleYProperty, Color, traceWrite, traceEnabled, traceCategories
|
||||||
} from "./animation-common";
|
} from "./animation-common";
|
||||||
|
|
||||||
import { CacheLayerType, layout } from "utils/utils";
|
import { CacheLayerType, layout } from "utils/utils";
|
||||||
|
@ -584,7 +584,7 @@ export class CssAnimationProperty<T extends Style, U> {
|
|||||||
let prev = this[computedValue];
|
let prev = this[computedValue];
|
||||||
if (value === unsetValue) {
|
if (value === unsetValue) {
|
||||||
this[symbol] = unsetValue;
|
this[symbol] = unsetValue;
|
||||||
if (this[computedSource] == propertySource) {
|
if (this[computedSource] === propertySource) {
|
||||||
// Fallback to lower value source.
|
// Fallback to lower value source.
|
||||||
if (this[styleValue] !== unsetValue) {
|
if (this[styleValue] !== unsetValue) {
|
||||||
this[computedSource] = ValueSource.Local;
|
this[computedSource] = ValueSource.Local;
|
||||||
@ -609,9 +609,15 @@ export class CssAnimationProperty<T extends Style, U> {
|
|||||||
}
|
}
|
||||||
let next = this[computedValue];
|
let next = this[computedValue];
|
||||||
if (prev !== next && (!equalityComparer || !equalityComparer(prev, next))) {
|
if (prev !== next && (!equalityComparer || !equalityComparer(prev, next))) {
|
||||||
valueChanged && valueChanged(this, prev, next);
|
if (valueChanged) {
|
||||||
this.view.nativeView && (this.view[native] = next);
|
valueChanged(this, prev, next);
|
||||||
this.hasListeners(eventName) && this.notify({ eventName, object: this, propertyName, value });
|
}
|
||||||
|
if (this.view.nativeView) {
|
||||||
|
this.view[native] = next;
|
||||||
|
}
|
||||||
|
if (this.hasListeners(eventName)) {
|
||||||
|
this.notify({ eventName, object: this, propertyName, value });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -637,7 +643,7 @@ export class CssAnimationProperty<T extends Style, U> {
|
|||||||
Object.defineProperty(cls.prototype, defaultName, defaultPropertyDescriptor);
|
Object.defineProperty(cls.prototype, defaultName, defaultPropertyDescriptor);
|
||||||
Object.defineProperty(cls.prototype, cssName, cssPropertyDescriptor);
|
Object.defineProperty(cls.prototype, cssName, cssPropertyDescriptor);
|
||||||
Object.defineProperty(cls.prototype, propertyName, stylePropertyDescriptor);
|
Object.defineProperty(cls.prototype, propertyName, stylePropertyDescriptor);
|
||||||
if (options.cssName && options.cssName != options.name) {
|
if (options.cssName && options.cssName !== options.name) {
|
||||||
Object.defineProperty(cls.prototype, options.cssName, stylePropertyDescriptor);
|
Object.defineProperty(cls.prototype, options.cssName, stylePropertyDescriptor);
|
||||||
}
|
}
|
||||||
Object.defineProperty(cls.prototype, keyframeName, keyframePropertyDescriptor);
|
Object.defineProperty(cls.prototype, keyframeName, keyframePropertyDescriptor);
|
||||||
|
Reference in New Issue
Block a user