# HG changeset patch # User hertzhaft # Date 1332430712 -3600 # Node ID 59fa7b6ae9f79cfd0a1c7afbc3e1c587008ecbc3 # Parent aef8a02e7ea5ef1648b10ce69359e8361410dae3 fixed 2 tiny bugs in TinyRange diff -r aef8a02e7ea5 -r 59fa7b6ae9f7 webapp/src/main/webapp/jquery/jquery.range.js --- a/webapp/src/main/webapp/jquery/jquery.range.js Thu Mar 22 15:39:25 2012 +0100 +++ b/webapp/src/main/webapp/jquery/jquery.range.js Thu Mar 22 16:38:32 2012 +0100 @@ -152,7 +152,7 @@ var updateHandles = function(){ - if (options.values){ + if (options.values != null) { if (options.range){ moveHandle($handle2, valueToPx(options.values[1]), false); moveHandle($handle, valueToPx(options.values[0]), false); @@ -176,7 +176,9 @@ var valueToPx = function(val){ var w = $input.width(); - var v = (val*(w/(options.max-options.min)))-options.min; + var valspan = options.max - options.min; + var valpos = val - options.min; + var v = valpos * w / valspan; return v; };