mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
The original issue described here: https://github.com/NativeScript/NativeScript/issues/4804 is fixed in 3.2 but there is another bug which doesn't render borderRadius on Image element. (#4963)
This commit is contained in:
@ -227,19 +227,21 @@ export class View extends ViewCommon {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _onSizeChanged(): void {
|
private _onSizeChanged(): void {
|
||||||
let nativeView = this.nativeViewProtected;
|
const nativeView = this.nativeViewProtected;
|
||||||
if (!nativeView) {
|
if (!nativeView) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
let background = this.style.backgroundInternal;
|
const background = this.style.backgroundInternal;
|
||||||
const backgroundDependsOnSize = background.image || !background.hasUniformBorder();
|
const backgroundDependsOnSize = background.image
|
||||||
|
|| !background.hasUniformBorder()
|
||||||
|
|| background.hasBorderRadius();
|
||||||
|
|
||||||
if (this._nativeBackgroundState === "invalid" || (this._nativeBackgroundState === "drawn" && backgroundDependsOnSize)) {
|
if (this._nativeBackgroundState === "invalid" || (this._nativeBackgroundState === "drawn" && backgroundDependsOnSize)) {
|
||||||
this._redrawNativeBackground(background);
|
this._redrawNativeBackground(background);
|
||||||
}
|
}
|
||||||
|
|
||||||
let clipPath = this.style.clipPath;
|
const clipPath = this.style.clipPath;
|
||||||
if (clipPath !== "" && this[clipPathProperty.setNative]) {
|
if (clipPath !== "" && this[clipPathProperty.setNative]) {
|
||||||
this[clipPathProperty.setNative](clipPath);
|
this[clipPathProperty.setNative](clipPath);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user