Revision: 4860
          http://sourceforge.net/p/vexi/code/4860
Author:   clrg
Date:     2016-06-17 22:18:09 +0000 (Fri, 17 Jun 2016)
Log Message:
-----------
Previous fix exposed broken behaviour. Improve/fix that too!

Modified Paths:
--------------
    branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/slider.t

Modified: 
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/slider.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/slider.t  
2016-06-17 21:01:32 UTC (rev 4859)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/slider.t  
2016-06-17 22:18:09 UTC (rev 4860)
@@ -38,8 +38,17 @@
         }
         
         /** used to sync the handle position */
-        thisbox.syncHandle = function(v) { cascade = v; step = step; }
+        thisbox.syncHandle = function() { 
+               // adjust the handle position according to the step
+               th_handle[pos] = step * (th_track[dim] - th_handle[dim]) / 
numsteps;
+        }
         
+        /** for track/thumb to sync handle when resizing */
+        thisbox.syncHandleTrap = function(v) { 
+            cascade = v;
+            syncHandle();
+        }
+        
         // draggable integration
         thisbox.moveEvent = function(v) { cascade = v; syncStep(); }
         thisbox.Press1 ++= thisbox.moveEvent;
@@ -71,8 +80,7 @@
         // nothing to do
         if (s == trapee.step) return;
         cascade = s;
-        // adjust the handle position according to the step
-        trapee.th_handle[trapee.pos] = trapee.step * 
(trapee.th_track[trapee.dim] - trapee.th_handle[trapee.dim]) / trapee.numsteps;
+        trapee.syncHandle();
         // fire value traps
         trapee.traplock = true;
         trapee.value = trapee.value;
@@ -94,13 +102,13 @@
     /** mak sure the handle is kept at the write track position */
     static.handleWrite = function(v) {
         cascade = v;
-        trapee.th_handle.width ++= trapee.syncHandle;
+        trapee.th_handle.width ++= trapee.syncHandleTrap;
     }
     
     /** mak sure the handle is kept at the write track position */
     static.trackWrite = function(v) {
         cascade = v;
-        trapee.th_track.width ++= trapee.syncHandle;
+        trapee.th_track.width ++= trapee.syncHandleTrap;
     }
     
     /** return value based on step */

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to