Skip to content

Commit

Permalink
Optimize this.options and this.wrapper minification in the setPositio…
Browse files Browse the repository at this point in the history
…n method
  • Loading branch information
Arian committed May 27, 2010
1 parent d8e37b3 commit 64dc47f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Source/MooDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,16 +143,17 @@ var MooDialog = new Class({
},

setPosition: function(x,y){
x += this.options.offset.x;
y += this.options.offset.y;
var options = this.options, wrapper = this.wrapper;
x += options.offset.x;
y += options.offset.y;
x = x < 10 ? 10 : x;
y = y < 10 ? 10 : y;
if(this.wrapper.getStyle('position') != 'fixed'){
if(wrapper.getStyle('position') != 'fixed'){
var scroll = document.id(document.body).getScroll();
x += scroll.x;
y += scroll.y
}
this.wrapper.setStyles({
wrapper.setStyles({
left: x,
top: y
});
Expand Down

0 comments on commit 64dc47f

Please sign in to comment.