Side navigation
#1306 closed bug (wontfix)
Opened June 19, 2007 08:01PM UTC
Closed March 31, 2008 02:18AM UTC
Interface: Slider fractions are incorrectly reset when restricted is enabled with two indicators
Reported by: | rmarscher | Owned by: | stefan |
---|---|---|---|
Priority: | minor | Milestone: | 1.1.3 |
Component: | interface | Version: | 1.1.2 |
Keywords: | slider | Cc: | |
Blocked by: | Blocking: |
Description
Here's how I can replicate this problem. Setup a horizontal slider with two indicators, restricted set to true, and fractions set to 10. Move the two indicators away from the end points of the slider. Now move them again. You should see that the fractions have been reset to be determined by the new width between the indicators rather than the total width of the slider.
I was able to fix this by editing modifyContainer in islider.js and moving the "if(elm.dragCfg.fractions) {" block above the "if (elm.SliderContainer.slideCfg.restricted ) {" block. I haven't tested many cases, but this change doesn't seem to cause any side effects. I've attached my edited islider.js. Hope it helps.
I saw this problem was mentioned in the jQuery google group. I responded to that as well. http://groups.google.com/group/jquery-en/browse_thread/thread/4436dfe39e5415ef
I found a related bug... the percentages returned by SliderGetValues() are also incorrect when you have two indicators moved in from the end points. Commenting out the fractions conditional in onSlide fixes it for me... but I feel like I surely must be breaking some other functionality. Let me know if you want me to supply more example code that illustrates the problems I've encountered. Thanks!