@nativescript/core
Version:
A JavaScript library providing an easy to use api for interacting with iOS and Android platform APIs.
40 lines • 1.18 kB
JavaScript
import { LayoutBaseCommon, clipToBoundsProperty, isPassThroughParentEnabledProperty } from './layout-base-common';
export * from './layout-base-common';
export class LayoutBase extends LayoutBaseCommon {
addChild(child) {
super.addChild(child);
this.requestLayout();
}
insertChild(child, atIndex) {
if (super.insertChild(child, atIndex)) {
this.requestLayout();
return true;
}
return false;
}
removeChild(child) {
super.removeChild(child);
this.requestLayout();
}
_setNativeClipToBounds() {
if (this.clipToBounds) {
const view = this.nativeViewProtected;
if (view) {
view.clipsToBounds = true;
}
}
else {
super._setNativeClipToBounds();
}
}
[clipToBoundsProperty.getDefault]() {
return false;
}
[clipToBoundsProperty.setNative](value) {
this._setNativeClipToBounds();
}
[isPassThroughParentEnabledProperty.setNative](value) {
this.nativeViewProtected.setPassThroughParent(value);
}
}
//# sourceMappingURL=layout-base.ios.js.map