@Override
public void cssPropertyChanged(CssEvent event) {
// called cssPropertyChanged(e) in HoverBrowserViewer()
+ ((HoverBrowserViewer) getViewer()).updateStyle();
String key = event.getPropertyKey();
if (key.equals(BuilderConstants.ATTRIBUTE_VALUE_WIDTH) || key.equals(BuilderConstants.ATTRIBUTE_VALUE_HEIGHT)) {
((HoverBrowserViewer) getViewer()).updateModel();
}
- ((HoverBrowserViewer) getViewer()).updateStyle();
}
@Override
if (heightString != null && !heightString.isEmpty()) {
String widthString = descriptor.getFeedbackWidth();
String widthValue = BuilderConstants.EMPTY;
- if (widthString != null && !widthString.isEmpty()) {
+ String widthStyle =
+ part.getSelectorPropertyValue(part.getDefaultSelectorName(),
+ BuilderConstants.ATTRIBUTE_VALUE_WIDTH);
+ if (widthString != null && !widthString.isEmpty()
+ && (widthStyle == null || widthStyle.isEmpty())) {
int width = Integer.valueOf(widthString);
widthValue =
BuilderConstants.ATTRIBUTE_VALUE_WIDTH + BuilderConstants.COLON
+ BuilderConstants.SEMICOLON;
}
- int height = Integer.valueOf(heightString).intValue();
- String value =
- widthValue + BuilderConstants.ATTRIBUTE_VALUE_HEIGHT
- + BuilderConstants.COLON + height
- + BuilderConstants.ATTRIBUTE_VALUE_PX;
+ String heightStyle =
+ part.getSelectorPropertyValue(part.getDefaultSelectorName(),
+ BuilderConstants.ATTRIBUTE_VALUE_HEIGHT);
+ String value = widthValue;
+ if (heightStyle == null || heightStyle.isEmpty()) {
+ int height = Integer.valueOf(heightString).intValue();
+ value =
+ widthValue + BuilderConstants.ATTRIBUTE_VALUE_HEIGHT
+ + BuilderConstants.COLON + height
+ + BuilderConstants.ATTRIBUTE_VALUE_PX;
+ }
elem.setAttribute(BuilderConstants.ATTRIBUTE_STYLE, value);
Element textElem = doc.createElement(BuilderConstants.PART_TEXT);