[NUI] Handle null inputs in shadow
authorJiyun Yang <ji.yang@samsung.com>
Tue, 27 Oct 2020 10:11:44 +0000 (19:11 +0900)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Thu, 29 Oct 2020 08:37:19 +0000 (17:37 +0900)
Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/public/ViewProperty/Shadow.cs
src/Tizen.NUI/src/public/ViewProperty/ShadowBase.cs

index 680b010..ee7cef5 100644 (file)
@@ -48,7 +48,7 @@ namespace Tizen.NUI
         public Shadow(float blurRadius, Vector2 offset, Color color, Vector2 extents) : base(offset, extents)
         {
             BlurRadius = blurRadius;
-            Color = color == null ? null : new Color(color);
+            Color = color == null ? new Color(defaultColor) : new Color(color);
         }
 
         /// <summary>
index 2806e60..52702e5 100644 (file)
@@ -195,13 +195,13 @@ namespace Tizen.NUI
         {
             var transformMap = new PropertyMap();
 
-            if (!Offset.Equals(noOffset))
+            if (!noOffset.Equals(Offset))
             {
                 transformMap[(int)VisualTransformPropertyType.OffsetPolicy] = new PropertyValue(new Vector2((int)VisualTransformPolicyType.Absolute, (int)VisualTransformPolicyType.Absolute));
                 transformMap[(int)VisualTransformPropertyType.Offset] = PropertyValue.CreateWithGuard(Offset);
             }
 
-            if (!Extents.Equals(noExtents))
+            if (!noExtents.Equals(Extents))
             {
                 transformMap[(int)VisualTransformPropertyType.ExtraSize] = PropertyValue.CreateWithGuard(Extents);
             }