Fabio wrote:
I think that you must change the if on the methods getleft and gettop on
UiObjectConnector because you've not considered the case in wich the panel
is shifted but the position is static
I've posted you my change code
public int getLeft() {
int containerOffset = 0;
Element parent = DOM.getParent(wrapped.getElement());
while (parent != null) {
if (("relative".equals( DOM.getStyleAttribute(parent,
"position")) || ("static"
.equalsIgnoreCase(DOM.getStyleAttribute(parent,
"position"))))) {
containerOffset = DOM.getAbsoluteLeft (parent);
break;
}
parent = DOM.getParent(parent);
}
return wrapped.getAbsoluteLeft() - containerOffset;
}
/**
* @see pl.balon.gwt.diagrams.client.connector.Connector#getTop ()
*/
public int getTop() {
int containerOffset = 0;
Element parent = DOM.getParent(wrapped.getElement());
while (parent != null) {
if (("relative".equals( DOM.getStyleAttribute(parent,
"position")) || ("static"
.equalsIgnoreCase(DOM.getStyleAttribute(parent,
"position"))))) {
containerOffset = DOM.getAbsoluteTop (parent);
break;
}
parent = DOM.getParent(parent);
}
return wrapped.getAbsoluteTop() - containerOffset;
}
Original issue reported on code.google.com by michal.b...@gmail.com on 24 Jan 2008 at 9:51
Original issue reported on code.google.com by
michal.b...@gmail.com
on 24 Jan 2008 at 9:51