shave a line

This commit is contained in:
James Campos 2011-10-08 12:27:21 -07:00
parent 7791f77f6b
commit 338679b658
2 changed files with 3 additions and 5 deletions

View File

@ -230,8 +230,7 @@
return ui.height = d.body.clientHeight - el.offsetHeight;
},
drag: function(e) {
var bottom, el, left, right, style, top;
el = ui.el;
var bottom, left, right, style, top;
left = e.clientX - ui.dx;
if (left < 10) {
left = '0';
@ -246,7 +245,7 @@
top = null;
}
bottom = top ? null : 0;
style = el.style;
style = ui.el.style;
style.top = top;
style.right = right;
style.bottom = bottom;

View File

@ -151,7 +151,6 @@ ui =
ui.width = d.body.clientWidth - el.offsetWidth
ui.height = d.body.clientHeight - el.offsetHeight
drag: (e) ->
{el} = ui
left = e.clientX - ui.dx
if left < 10 then left = '0'
else if ui.width - left < 10 then left = null
@ -162,7 +161,7 @@ ui =
bottom = if top then null else 0
#using null instead of '' is 4% faster
#these 4 statements are 40% faster than 1 style.cssText
{style} = el
{style} = ui.el
style.top = top
style.right = right
style.bottom = bottom