1 | import { LayoutBaseCommon, clipToBoundsProperty, isPassThroughParentEnabledProperty } from './layout-base-common';
|
2 | export * from './layout-base-common';
|
3 | export class LayoutBase extends LayoutBaseCommon {
|
4 | addChild(child) {
|
5 | super.addChild(child);
|
6 | this.requestLayout();
|
7 | }
|
8 | insertChild(child, atIndex) {
|
9 | super.insertChild(child, atIndex);
|
10 | this.requestLayout();
|
11 | }
|
12 | removeChild(child) {
|
13 | super.removeChild(child);
|
14 | this.requestLayout();
|
15 | }
|
16 | _setNativeClipToBounds() {
|
17 | if (this.clipToBounds) {
|
18 | const view = this.nativeViewProtected;
|
19 | if (view) {
|
20 | view.clipsToBounds = true;
|
21 | }
|
22 | }
|
23 | else {
|
24 | super._setNativeClipToBounds();
|
25 | }
|
26 | }
|
27 | [clipToBoundsProperty.getDefault]() {
|
28 | return false;
|
29 | }
|
30 | [clipToBoundsProperty.setNative](value) {
|
31 | this._setNativeClipToBounds();
|
32 | }
|
33 | [isPassThroughParentEnabledProperty.setNative](value) {
|
34 | this.nativeViewProtected.setPassThroughParent(value);
|
35 | }
|
36 | }
|
37 |
|
\ | No newline at end of file |