mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 19:26:42 +08:00
_boundsChanged method added
This commit is contained in:
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
1
ui/styling/style.d.ts
vendored
1
ui/styling/style.d.ts
vendored
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user