static/app.js
/**
 * Determine the perimeter of an elements containing block. This is the box that
 * determines the childs positioning. The container cords are relative to the 
 * document element not the viewport; so take into account scrolling.
 *
 * @param {Element} child
 * @return {Object}
 */
Determine the perimeter of an elements containing block. This is the box that
determines the childs positioning. The container cords are relative to the
document element not the viewport; so take into account scrolling.

@param {Element} child
@return {Object}
Determine the perimeter of an elements containing block . This is the box that determines the childs positioning . The container cords are relative to the document element not the viewport ; so take into account scrolling . @param { Element } child @return { Object }
function containerBox (child) {
	var container = offsetParent(child)
	if (!container) {
		container = child.ownerDocument.documentElement
		return {
			top   : 0,
			left  : 0,
			right : container.offsetWidth,
			bottom: container.offsetHeight,
			width : container.offsetWidth,
			height: container.offsetHeight
		}
	}
	var offset = position(container)
	  , css = style(container)
	offset.top    += parseFloat(css.borderTopWidth) || 0
	offset.left   += parseFloat(css.borderLeftWidth)|| 0
	offset.right  -= parseFloat(css.borderRightWidth) || 0
	offset.bottom -= parseFloat(css.borderBottomWidth) || 0
	offset.width   = offset.right - offset.left
	offset.height  = offset.bottom - offset.top
	return offset
}
function containerBox ( child ) { var container = offsetParent ( child ) if ( ! container ) { container = child . ownerDocument . documentElement return { top : 0 , left : 0 , right : container . offsetWidth , bottom : container . offsetHeight , width : container . offsetWidth , height : container . offsetHeight } } var offset = position ( container ) , css = style ( container ) offset . top += parseFloat ( css . borderTopWidth ) || 0 offset . left += parseFloat ( css . borderLeftWidth ) || 0 offset . right -= parseFloat ( css . borderRightWidth ) || 0 offset . bottom -= parseFloat ( css . borderBottomWidth ) || 0 offset . width = offset . right - offset . left offset . height = offset . bottom - offset . top return offset }
Determine the perimeter of an elements containing block.
Determine the perimeter of an elements containing block .
// The outer edges of the document // Remove its border