lines 77-80 of slider.js:
slider.setValue(parseFloat(
(Object.isArray(slider.options.sliderValue) ?
slider.options.sliderValue[i] : slider.options.sliderValue)
||
slider.range.start), i);
which of course won't work if your initial value is 0.0 in a range -1
to 1. Instead it will initialize it to -1 because it evaluates as
parseFloat( (0.0) || -1, i ). The fix:
var initialValue;
if( typeof slider.options.sliderValue === 'undefined' ) {
initialValue = slider.range.start;
} else if( Object.isArray(slider.options.sliderValue) ) {
initialValue = slider.options.sliderValue[i];
} else {
initialValue = slider.options.sliderValue;
}
Such easy to understand code is a no-no so I'm sure you'll want to
further compound your ( Object.isArray() ? sliderValue[i] : typeof !==
'undefined' ? sliderValue : range.start ).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---