Minor bug in SectionDecoration?

6 views
Skip to first unread message

Philippe Frangioni

unread,
Mar 24, 2010, 5:58:05 AM3/24/10
to gwt-connectors
Hi,
in some of our diagrams, we have horizontal connectors (the 3 sections
are superimposed). And these connectors are decorated with an arrow.
We had a problem with the arrows which were not vertically centered in
relation to the connector itself.

We fixed this problem with these changes:

Index: trunk/gwt-connectors/src/main/java/pl/tecna/gwt/connectors/
client/SectionDecoration.java
===================================================================
diff -u -N -r2026 -r2077
--- trunk/gwt-connectors/src/main/java/pl/tecna/gwt/connectors/client/
SectionDecoration.java (.../SectionDecoration.java) (revision 2026)
+++ trunk/gwt-connectors/src/main/java/pl/tecna/gwt/connectors/client/
SectionDecoration.java (.../SectionDecoration.java) (revision 2077)
@@ -68,11 +68,11 @@
top = top - this.getWidget().getOffsetHeight() + 2;
break;
case HORIZONTAL_LEFT:
- top = top - (this.getWidget().getOffsetHeight() / 2) + 1;
+ top = top - (this.getWidget().getOffsetHeight() / 2) - 1;
left = left - 1;
break;
case HORIZONTAL_RIGHT:
- top = top - (this.getWidget().getOffsetHeight() / 2) + 1;
+ top = top - (this.getWidget().getOffsetHeight() / 2) - 1;
left = left - this.getWidget().getOffsetWidth();
break;
}

Anybody else got this problem?

Thanks,
Phil

Reply all
Reply to author
Forward
0 new messages