Revision: 4859 http://sourceforge.net/p/vexi/code/4859 Author: clrg Date: 2016-06-17 21:01:32 +0000 (Fri, 17 Jun 2016) Log Message: ----------- Fix double cascade in slider step write trap - long standing bug - slider sending out values beyond min/max settings
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-14 12:00:58 UTC (rev 4858) +++ branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/lib/widget/slider.t 2016-06-17 21:01:32 UTC (rev 4859) @@ -28,7 +28,9 @@ var surfaceToTrack; var syncStep = function() { - if (surfaceToTrack==null) surfaceToTrack = surface.frame.distanceto(th_track); + if (surfaceToTrack==null) + surfaceToTrack = surface.frame.distanceto(th_track); + step = vexi.math.round(numsteps * (surface.frame.mouse[pos] - vexi.math.abs(surfaceToTrack[pos]) - @@ -65,14 +67,16 @@ /** move handle based on new step value */ static.stepWrite = function(v) { // make sure step has a valid value - cascade = (0 > v) ? 0 : (v > trapee.numsteps) ? trapee.numsteps : v; + var s = (0 > v) ? 0 : (v > trapee.numsteps) ? trapee.numsteps : v; + // 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; // fire value traps trapee.traplock = true; trapee.value = trapee.value; trapee.traplock = false; - cascade = v; } /** recalculate numsteps based on interval/min/max */ 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