int dh = XDOM.getViewHeight(false) - 5;
int scrollX = XDOM.getBodyScrollLeft() + 5;
int scrollY = XDOM.getBodyScrollTop() + 5;
int[] axy = new int[] {xy.x + offsets[0], xy.y + offsets[1]};
Size sz = getSize();
Region r = target.el().getRegion();
anchorEl.removeStyleName(anchorStyle);
// if we are not inside valid ranges we try to switch the anchor
if (!((toolTipConfig.getAnchor().equals("top") && (sz.height + offsets[1] + scrollY < dh - r.bottom))