mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix Background.isEmpty regression
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user