From bc6afc2fd2a032d04b735517eeb9190d210b2282 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Wed, 23 Mar 2016 11:54:36 +0200 Subject: [PATCH] Add `LayoutBase.clipToBounds` property Resolves #1829 --- ui/layouts/layout-base.d.ts | 5 +++++ ui/layouts/layout-base.ts | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ui/layouts/layout-base.d.ts b/ui/layouts/layout-base.d.ts index 207529d7e..0dc7158f7 100644 --- a/ui/layouts/layout-base.d.ts +++ b/ui/layouts/layout-base.d.ts @@ -104,5 +104,10 @@ * Specify the top padding of this layout. */ paddingTop: number; + + /** + * Gets or sets a value indicating whether to clip the content of this layout. + */ + clipToBounds: boolean; } } diff --git a/ui/layouts/layout-base.ts b/ui/layouts/layout-base.ts index c78b87a6a..02e191135 100644 --- a/ui/layouts/layout-base.ts +++ b/ui/layouts/layout-base.ts @@ -111,6 +111,13 @@ export class LayoutBase extends view.CustomLayoutView implements definition.Layo 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) { var nativeView = this._nativeView; if (!nativeView) {