docs/js/plugins.js
function rect(t, e) {
		var o = window,
			r = t.getBoundingClientRect(),
			x = o.pageXOffset,
			y = o.pageYOffset,
			m = {},
			f = "none";

		if (e) {
			var s = style(t);
			m = {
				top: parseInt(s["margin-top"], 10),
				left: parseInt(s["margin-left"], 10),
				right: parseInt(s["margin-right"], 10),
				bottom: parseInt(s["margin-bottom"], 10)
			};

			f = s.float;
		}

		return {
			w: r.width,
			h: r.height,
			x1: r.left + x,
			x2: r.right + x,
			y1: r.top + y,
			y2: r.bottom + y,
			margin: m,
			float: f
		};
	}
function rect(t, e) {
		var o = window,
			r = t.getBoundingClientRect(),
			x = o.pageXOffset,
			y = o.pageYOffset,
			m = {},
			f = "none";

		if (e) {
			var s = style(t);
			m = {
				top: parseInt(s["margin-top"], 10),
				left: parseInt(s["margin-left"], 10),
				right: parseInt(s["margin-right"], 10),
				bottom: parseInt(s["margin-bottom"], 10)
			};

			f = s.float;
		}

		return {
			w: r.width,
			h: r.height,
			x1: r.left + x,
			x2: r.right + x,
			y1: r.top + y,
			y2: r.bottom + y,
			margin: m,
			float: f
		};
	}
function rect ( t , e ) { var o = window , r = t . getBoundingClientRect ( ) , x = o . pageXOffset , y = o . pageYOffset , m = { } , f = "none" ; if ( e ) { var s = style ( t ) ; m = { top : parseInt ( s [ "margin-top" ] , 10 ) , left : parseInt ( s [ "margin-left" ] , 10 ) , right : parseInt ( s [ "margin-right" ] , 10 ) , bottom : parseInt ( s [ "margin-bottom" ] , 10 ) } ; f = s . float ; } return { w : r . width , h : r . height , x1 : r . left + x , x2 : r . right + x , y1 : r . top + y , y2 : r . bottom + y , margin : m , float : f } ; }
Get an element's DOMRect relative to the document instead of the viewport.
@param  {Object} t 	HTMLElement
@param  {Boolean} e 	Include margins
@return {Object}   	Formatted DOMRect copy
Get an element s DOMRect relative to the document instead of the viewport .