JSAPI.info

dojo.coords

Dojo (1.6.1) - see full source
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
dojo.coords = function(/*DomNode|String*/node, /*Boolean?*/includeScroll){
    //    summary:
    //        Deprecated: Use position() for border-box x/y/w/h
    //        or marginBox() for margin-box w/h/l/t.
    //        Returns an object representing a node's size and position.
    //
    //    description:
    //        Returns an object that measures margin-box (w)idth/(h)eight
    //        and absolute position x/y of the border-box. Also returned
    //        is computed (l)eft and (t)op values in pixels from the
    //        node's offsetParent as returned from marginBox().
    //        Return value will be in the form:
    //|            { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }
    //        Does not act as a setter. If includeScroll is passed, the x and
    //        y params are affected as one would expect in dojo.position().
    var n = byId(node), s = gcs(n), mb = d._getMarginBox(n, s);
    var abs = d.position(n, includeScroll);
    mb.x = abs.x;
    mb.y = abs.y;
    return mb;
};