setStyle renamed to setInlineStyle

This commit is contained in:
Vladimir Enchev
2015-08-28 11:18:25 +03:00
parent 035e381673
commit 0aec988251
3 changed files with 4 additions and 4 deletions

View File

@@ -613,13 +613,13 @@ export var testIsVisible = function () {
}); });
} }
export var testSetStyle = function () { export var testSetInlineStyle = function () {
var lbl = new label.Label(); var lbl = new label.Label();
var expectedColor = "#ff0000"; var expectedColor = "#ff0000";
var expectedBackgroundColor = "#ff0000"; var expectedBackgroundColor = "#ff0000";
lbl.setStyle(`color: ${expectedColor};background-color: ${expectedBackgroundColor};`); lbl.setInlineStyle(`color: ${expectedColor};background-color: ${expectedBackgroundColor};`);
helper.buildUIAndRunTest(lbl, function (views: Array<viewModule.View>) { helper.buildUIAndRunTest(lbl, function (views: Array<viewModule.View>) {
TKUnit.assertEqual(lbl.color.hex, expectedColor); TKUnit.assertEqual(lbl.color.hex, expectedColor);

View File

@@ -923,7 +923,7 @@ export class View extends proxy.ProxyObject implements definition.View {
return false; return false;
} }
public setStyle(style: string): void { public setInlineStyle(style: string): void {
if (!types.isString(style)) { if (!types.isString(style)) {
throw new Error("Parameter should be valid CSS string!"); throw new Error("Parameter should be valid CSS string!");
} }

2
ui/core/view.d.ts vendored
View File

@@ -360,7 +360,7 @@ declare module "ui/core/view" {
* Sets in-line CSS string as style. * Sets in-line CSS string as style.
* @param style - In-line CSS string. * @param style - In-line CSS string.
*/ */
public setStyle(style: string) : void; public setInlineStyle(style: string) : void;
public getGestureObservers(type: gestures.GestureTypes): Array<gestures.GesturesObserver>; public getGestureObservers(type: gestures.GestureTypes): Array<gestures.GesturesObserver>;