else
return element.acceptIncomingLink();
}
public void updateLink(Point mouse) {
GElement ce = delegate.eventQueryElementAtPoint(mouse);
boolean selfLoop = ce == startElement;
setLinkStartAnchor(startElement.getAnchor(startAnchorKey));
if(ce == null || ce instanceof GLink) {
setLinkEnd(Vector2D.vector(mouse), Anchor2D.DIRECTION_BOTTOM);
} else {
Anchor2D anchor = ce.getAnchorClosestToPoint(mouse);
String anchorKey = ce.getAnchorKeyClosestToPoint(mouse);
setLinkEnd(anchor.position, anchor.direction);
if(selfLoop) {
if(anchor.direction == Anchor2D.DIRECTION_FREE)
linkArc.setMouse(mouse);
else
linkArc.setMouse(anchor.position.add(anchor.direction));
linkArc.setEndTangentOffset(startElement.getDefaultAnchorOffset(anchorKey));
} else {
linkArc.setMouse(mouse);
linkArc.setEndTangentOffset(ce.getDefaultAnchorOffset(anchorKey));
}
if(selfLoop && view.defaultLinkShape() == GLink.SHAPE_ELBOW
&& startElement.getAnchor(startAnchorKey).equals(anchor))
{