From 129c305942180b8dab70219fb600ff851a8e7bba Mon Sep 17 00:00:00 2001 From: Vladimir Enchev Date: Wed, 21 Oct 2015 13:20:48 +0300 Subject: [PATCH] _boundsChanged method added --- ui/core/view.ios.ts | 5 +---- ui/styling/style.d.ts | 1 + ui/styling/style.ts | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ui/core/view.ios.ts b/ui/core/view.ios.ts index 54fdb1b14..608dfac9a 100644 --- a/ui/core/view.ios.ts +++ b/ui/core/view.ios.ts @@ -274,10 +274,7 @@ export class View extends viewCommon.View { } private _onBoundsChanged() { - var bgColor = background.ios.createBackgroundUIColor(this); - if (bgColor) { - this._nativeView.backgroundColor = bgColor; - } + this.style._boundsChanged(); } } diff --git a/ui/styling/style.d.ts b/ui/styling/style.d.ts index 7695725b8..256cabe7e 100644 --- a/ui/styling/style.d.ts +++ b/ui/styling/style.d.ts @@ -71,6 +71,7 @@ declare module "ui/styling/style" { public _syncNativeProperties(): void; public _inheritStyleProperty(property: Property): void; public _inheritStyleProperties(): void; + public _boundsChanged(): void; } export function registerHandler(property: Property, handler: styling.stylers.StylePropertyChangedHandler, className?: string); diff --git a/ui/styling/style.ts b/ui/styling/style.ts index ceaf34822..78b7c3ce4 100644 --- a/ui/styling/style.ts +++ b/ui/styling/style.ts @@ -599,6 +599,10 @@ export class Style extends DependencyObservable implements styling.Style { }); } + public _boundsChanged() { + this._applyProperty(backgroundInternalProperty, this._getValue(backgroundInternalProperty)); + } + private _applyProperty(property: Property, newValue: any) { this._applyStyleProperty(property, newValue);