[richfaces-svn-commits] JBoss Rich Faces SVN: r2731 - trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Tue Sep 4 07:47:51 EDT 2007


Author: a.izobov
Date: 2007-09-04 07:47:50 -0400 (Tue, 04 Sep 2007)
New Revision: 2731

Modified:
   trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js
Log:
http://jira.jboss.com/jira/browse/RF-793

Modified: trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js
===================================================================
--- trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js	2007-09-04 11:32:12 UTC (rev 2730)
+++ trunk/ui/dataFilterSlider/src/main/resources/org/richfaces/renderkit/html/scripts/scriptaculous-js-1.6.5/src/slider.js	2007-09-04 11:47:50 UTC (rev 2731)
@@ -49,11 +49,6 @@
 
     this.trackLength = this.maximumOffset() - this.minimumOffset();
 
-    this.handleLength = this.isVertical() ?
-      (this.handles[0].offsetHeight != 0 ?
-        this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
-      (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
-        this.handles[0].style.width.replace(/px$/,""));
 
     this.active   = false;
     this.dragging = false;
@@ -72,7 +67,22 @@
     this.eventMouseUp   = this.endDrag.bindAsEventListener(this);
     this.eventMouseMove = this.update.bindAsEventListener(this);
 
+    Event.observe(this.track, "mousedown", this.eventMouseDown);
+    Event.observe(document, "mouseup", this.eventMouseUp);
+    Event.observe(document, "mousemove", this.eventMouseMove);
     // Initialize handles in reverse (make sure first handle is active)
+    this.handles[0].style.visibility="hidden";
+	setTimeout(this.initHandles.bind(this), 100);
+    this.initialized = true;
+  },
+  initHandles: function() {
+    this.handleLength = this.isVertical() ?
+      (this.handles[0].offsetHeight != 0 ?
+        this.handles[0].offsetHeight : this.handles[0].style.height.replace(/px$/,"")) :
+      (this.handles[0].offsetWidth != 0 ? this.handles[0].offsetWidth :
+        this.handles[0].style.width.replace(/px$/,""));
+
+    var slider = this;
     this.handles.each( function(h,i) {
       i = slider.handles.length-1-i;
       slider.setValue(parseFloat(
@@ -82,12 +92,7 @@
       Element.makePositioned(h); // fix IE
       Event.observe(h, "mousedown", slider.eventMouseDown);
     });
-
-    Event.observe(this.track, "mousedown", this.eventMouseDown);
-    Event.observe(document, "mouseup", this.eventMouseUp);
-    Event.observe(document, "mousemove", this.eventMouseMove);
-
-    this.initialized = true;
+    this.handles[0].style.visibility="";
   },
   dispose: function() {
     var slider = this;




More information about the richfaces-svn-commits mailing list