[NUI][API11] Fix error if LottieAnimationView set BackgroundData before set URL
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 15 Feb 2024 06:31:17 +0000 (15:31 +0900)
committerEunki Hong <h.pichulia@gmail.com>
Mon, 19 Feb 2024 04:56:19 +0000 (13:56 +0900)
Since LottieAnimationView.URL property change whole Visual property by itself, CornerRadius / Borderline properties become ignored when we set URL.

```
lav = new LottieAnimationView();
lav.CornerRadius = new Vector4(100.0f, 100.0f, 100.0f, 100.0f);
lav.URL = "~~~.json"; ///< CornerRadius information ignored.
```

To avoid this case, let we ensure to set CornerRadius / Borderline if we set URL

Same PR with #5951

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/BaseComponents/LottieAnimationView.cs

index 7ce0558..f280826 100755 (executable)
@@ -198,6 +198,18 @@ namespace Tizen.NUI.BaseComponents
 
                 Image = map;
 
+                if (backgroundExtraData != null)
+                {
+                    if (backgroundExtraData.CornerRadius != null)
+                    {
+                        UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.ContentsCornerRadius);
+                    }
+                    if (backgroundExtraData.BorderlineWidth > 0.0f)
+                    {
+                        UpdateBackgroundExtraData(BackgroundExtraDataUpdatedFlag.ContentsBorderline);
+                    }
+                }
+
                 // All states applied well.
                 currentStates.changed = false;