Fix Background.isEmpty regression

This commit is contained in:
Rossen Hristov
2017-01-03 15:12:39 +02:00
parent 11f8da025b
commit 163592ed60
2 changed files with 4 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ import helper = require("../helper");
import labelModule = require("ui/label");
import stackLayoutModule = require("ui/layouts/stack-layout");
import tabViewTestsNative = require("./tab-view-tests-native");
import { resetStyleProperties } from "ui/core/view";
import { unsetValue } from "ui/core/view";
// Using a TabView requires the "ui/tab-view" module.
// >> article-require-tabview-module
@@ -331,7 +331,7 @@ export class TabViewTest extends testModule.UITest<tabViewModule.TabView> {
//console.log(`>>>>>>>>>>>>> nativeFont: ${fontToString(nativeFont)}`);
console.log(`>>>>>>>>>>>>> RESET`);
resetStyleProperties(this.testView.style);
this.testView.style.font = unsetValue;
assertFontsAreEqual(tabViewTestsNative.getNativeFont(this.testView), originalFont, "Font must be the original one after resetting the style.");
}
}

View File

@@ -316,8 +316,8 @@ export class Background implements BackgroundDefinition {
};
public isEmpty(): boolean {
return this.color
&& this.image
return !this.color
&& !this.image
&& !this.hasBorderWidth()
&& !this.hasBorderRadius()
&& !this.clipPath;