mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-16 03:31:45 +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 enums from "ui/enums";
|
||||
import * as frame from "ui/frame";
|
||||
import * as trace from "trace";
|
||||
|
||||
export class ViewModel extends observable.Observable {
|
||||
constructor() {
|
||||
|
@ -3,7 +3,7 @@ import {
|
||||
AnimationBase, Properties, PropertyAnimation, CubicBezierAnimationCurve, AnimationPromise,
|
||||
opacityProperty, backgroundColorProperty, rotateProperty,
|
||||
translateXProperty, translateYProperty,
|
||||
scaleXProperty, scaleYProperty, Color, traceWrite, traceEnabled, traceCategories, unsetValue
|
||||
scaleXProperty, scaleYProperty, Color, traceWrite, traceEnabled, traceCategories
|
||||
} from "./animation-common";
|
||||
|
||||
import { CacheLayerType, layout } from "utils/utils";
|
||||
|
@ -584,7 +584,7 @@ export class CssAnimationProperty<T extends Style, U> {
|
||||
let prev = this[computedValue];
|
||||
if (value === unsetValue) {
|
||||
this[symbol] = unsetValue;
|
||||
if (this[computedSource] == propertySource) {
|
||||
if (this[computedSource] === propertySource) {
|
||||
// Fallback to lower value source.
|
||||
if (this[styleValue] !== unsetValue) {
|
||||
this[computedSource] = ValueSource.Local;
|
||||
@ -609,9 +609,15 @@ export class CssAnimationProperty<T extends Style, U> {
|
||||
}
|
||||
let next = this[computedValue];
|
||||
if (prev !== next && (!equalityComparer || !equalityComparer(prev, next))) {
|
||||
valueChanged && valueChanged(this, prev, next);
|
||||
this.view.nativeView && (this.view[native] = next);
|
||||
this.hasListeners(eventName) && this.notify({ eventName, object: this, propertyName, value });
|
||||
if (valueChanged) {
|
||||
valueChanged(this, prev, next);
|
||||
}
|
||||
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, cssName, cssPropertyDescriptor);
|
||||
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, keyframeName, keyframePropertyDescriptor);
|
||||
|
Reference in New Issue
Block a user