MODEL : Fix image widget for size adjustment. 76/20976/1
authornakyoung2.choi <nakyoung2.choi@samsung.com>
Wed, 14 May 2014 09:26:21 +0000 (18:26 +0900)
committernakyoung2.choi <nakyoung2.choi@samsung.com>
Wed, 14 May 2014 09:26:21 +0000 (18:26 +0900)
Change-Id: Iaa48aaffb4708028d7024ccb8f8641056b635f88
Signed-off-by: nakyoung2.choi <nakyoung2.choi@samsung.com>
org.tizen.webuibuilder/src/org/tizen/webuibuilder/gef/editparts/HoverViewerEditPart.java
org.tizen.webuibuilder/src/org/tizen/webuibuilder/model/Part.java

index 7cfd58a..20fbc67 100644 (file)
@@ -42,6 +42,7 @@ import org.eclipse.gef.SnapToGuides;
 import org.eclipse.gef.SnapToHelper;
 import org.eclipse.gef.editparts.AbstractGraphicalEditPart;
 import org.eclipse.gef.rulers.RulerProvider;
+import org.tizen.webuibuilder.BuilderConstants;
 import org.tizen.webuibuilder.animator.model.part.AnimatorWidgetPart;
 import org.tizen.webuibuilder.bridge.DesignerGoingBridge.WidgetPosition;
 import org.tizen.webuibuilder.gef.figure.PageFigure;
@@ -238,6 +239,10 @@ public class HoverViewerEditPart extends AbstractGraphicalEditPart implements IP
     @Override
     public void cssPropertyChanged(CssEvent event) {
         // called cssPropertyChanged(e) in HoverBrowserViewer()
+        String key = event.getPropertyKey();
+        if (key.equals(BuilderConstants.ATTRIBUTE_VALUE_WIDTH) || key.equals(BuilderConstants.ATTRIBUTE_VALUE_HEIGHT)) {
+            ((HoverBrowserViewer) getViewer()).updateModel();
+        }
         ((HoverBrowserViewer) getViewer()).updateStyle();
     }
 
index be359af..bf98caa 100644 (file)
@@ -2615,12 +2615,26 @@ public class Part implements ISerializer {
                         return true;
                     }
                 } else {
-                    String value = getPropertyValue(condition);
-                    if (value == null || value.isEmpty()) {
-                        return true;
-                    } else {
-                        return false;
+                    String[] con = condition.split(BuilderConstants.COMMA);
+                    for (int i = 0; i < con.length; i++) {
+                        if (descriptor.getPropertyDescriptor(con[i]) != null) {
+                            String value = getPropertyValue(condition);
+                            if (value == null || value.isEmpty()) {
+                                continue;
+                            } else {
+                                return false;
+                            }
+                        } else {
+                            String styleValue = getSelectorPropertyValue(getDefaultSelectorName(), con[i]);
+                            
+                            if (styleValue == null || styleValue.isEmpty()) {
+                                continue;
+                            } else {
+                                return false;
+                            }
+                        }
                     }
+                    return true;
                 }
 
             }