scripts/position.js
changeset 11 0faea3a6c881
parent 10 d3059e20b0fa
child 42 774751e7faed
--- a/scripts/position.js	Mon Mar 24 02:53:42 2008 -0400
+++ b/scripts/position.js	Wed Mar 26 09:57:42 2008 -0400
@@ -16,11 +16,11 @@
   var minY = $(base).Top() + 3;
   var maxY = minY;
   var maxX = minX + $(base).Width() - 6;
-  Drag.init(slider, inner, minX, maxX, minY, maxY);
+  Drag.init(slider, slider, minX, maxX, minY, maxY);
   
-  inner.onDrag = posslide_handle_drag;
-  inner.onDragEnd = posslide_handle_dragend;
-  inner.onDragStart = function(x, y) { pos_in_drag = true; };
+  slider.onDrag = posslide_handle_drag;
+  slider.onDragEnd = posslide_handle_dragend;
+  slider.onDragStart = function(x, y) { pos_in_drag = true; };
   base.onclick = posslide_handle_click;
   
   posslide_set_position(0);
@@ -35,7 +35,7 @@
   if ( do_inner )
     inner.style.width = size + 'px';
   if ( ( pos_in_drag && !do_inner ) || ( !pos_in_drag && do_inner ) )
-    slider.style.left = x + 'px';
+    slider.style.left = ( x ) + 'px';
 }
 
 var posslide_handle_dragend = function(x, y)