Fixed tslint errors

This commit is contained in:
Panayot Cankov
2017-02-08 17:14:20 +02:00
parent 23658c9719
commit b12f112a44
3 changed files with 12 additions and 7 deletions

View File

@ -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() {

View File

@ -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";

View File

@ -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);