Add LayoutBase.clipToBounds property

Resolves #1829
This commit is contained in:
Rossen Hristov
2016-03-23 11:54:36 +02:00
parent 9d4aaf92c0
commit bc6afc2fd2
2 changed files with 12 additions and 0 deletions

View File

@@ -104,5 +104,10 @@
* Specify the top padding of this layout. * Specify the top padding of this layout.
*/ */
paddingTop: number; paddingTop: number;
/**
* Gets or sets a value indicating whether to clip the content of this layout.
*/
clipToBounds: boolean;
} }
} }

View File

@@ -111,6 +111,13 @@ export class LayoutBase extends view.CustomLayoutView implements definition.Layo
this.style.paddingLeft = value; this.style.paddingLeft = value;
} }
public get clipToBounds(): boolean {
return this._getValue(LayoutBase.clipToBoundsProperty);
}
public set clipToBounds(value: boolean) {
this._setValue(LayoutBase.clipToBoundsProperty, value);
}
protected onClipToBoundsChanged(oldValue: boolean, newValue: boolean) { protected onClipToBoundsChanged(oldValue: boolean, newValue: boolean) {
var nativeView = this._nativeView; var nativeView = this._nativeView;
if (!nativeView) { if (!nativeView) {