mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
recycleNativeView filed now accepts: "always" | "never" | "auto". Always will recycle the nativeView no matter if its nativeView or android proprties are accessed. Never will disable recycling. Auto will recycle it only if nativeView and android properties are not accessed.
22 lines
592 B
TypeScript
22 lines
592 B
TypeScript
import { LayoutBaseCommon, clipToBoundsProperty } from "./layout-base-common";
|
|
|
|
export * from "./layout-base-common";
|
|
|
|
export class LayoutBase extends LayoutBaseCommon {
|
|
nativeViewProtected: UIView;
|
|
|
|
[clipToBoundsProperty.getDefault](): boolean {
|
|
return false;
|
|
}
|
|
[clipToBoundsProperty.setNative](value: boolean) {
|
|
this._setNativeClipToBounds();
|
|
}
|
|
|
|
_setNativeClipToBounds() {
|
|
if (this.clipToBounds) {
|
|
this.nativeViewProtected.clipsToBounds = true;
|
|
} else {
|
|
super._setNativeClipToBounds();
|
|
}
|
|
}
|
|
} |