Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Darren Waddell authored and Darren Waddell committed Dec 26, 2009
1 parent 8744df5 commit 6788628
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions Compatibility/Element/Element.Dimensions.js
@@ -1,19 +1,16 @@
(function(){

function isBody(element){
return (/^(?:body|html)$/i).test(element.tagName);
};
function isBody(element){
return (/^(?:body|html)$/i).test(element.tagName);
};

Element.implement({
Element.implement({

getSize: function(){
var size = isBody(this) ? this.getWindow().getSize() : {x: this.offsetWidth, y: this.offsetHeight};
return $merge(size, {
size: size,
scroll: this.getScroll(),
scrollSize: this.getScrollSize()
})
}
getSize: function(){
var size = isBody(this) ? this.getWindow().getSize() : {x: this.offsetWidth, y: this.offsetHeight};
return $merge(size, {
size: size,
scroll: this.getScroll(),
scrollSize: this.getScrollSize()
})
}

});
});
})

0 comments on commit 6788628

Please sign in to comment.