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:
Hristo Hristov
2017-10-20 08:33:08 +03:00
committed by GitHub
parent 188c1f2568
commit 1b9610b4dd

View File

@ -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);
} }