wiln / flexlib

Automatically exported from code.google.com/p/flexlib
0 stars 0 forks source link

HSlider does not size trackHighlight/Thumbs correctly when min/max range is low and lockRegionsWhileDragging=true #130

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an HSlider with a width=300
2. Set min=0, max=5 value=[2,3] snapInterval=1
3. drag trackHighlightSkin to either left or right boundary of slider

What is the expected output? What do you see instead?
--------
You would expect the slider to behave as it does with larger values, and 
enforce the 
lockRegion.   Instead the slider does not enforce the lock region and puts the 
thumb closest to 
the boundary you are dragging to ON the boundary before it should and thus 
increasing the 
size of the trackHighlight.

It appears that the  override mx_internal function 
getXBounds(selectedThumbIndex:int):Object 
function is causing the issue, in that it is returning incorrect bounds.  If I 
figure out a fix I will 
post.

What version of the product are you using? On what operating system?
Latest FlexLib as of 6/6/08.  Mac OS X

Please provide any additional information below.
Sample:

<controls1:HSlider   height="30"
                            trackHighlightSkin="flexlib.skins.SliderThumbHighlightSkin"
                            allowTrackClick="true" allowThumbOverlap="false" 
lockRegionsWhileDragging="true"
                            liveDragging="true" 
                            showDataTip="true"  dataTipPlacement="bottom"   
dataTipOffset="3"
                            showTrackHighlight="true"
                            thumbCount="2"  width="400" 
                            values="[2, 3]"
                            minimum="1" maximum="500" snapInterval="1"
                        />

Original issue reported on code.google.com by twgonza...@gmail.com on 7 Jun 2008 at 2:16

GoogleCodeExporter commented 8 years ago
Ooops... change the maximum="5" instead of "500" in the above sample to see the 
issue.   There are also 
some other odd behaviors you will see as the trackHighlight jumps to larger 
sizes intermittently on dragging.

Original comment by twgonza...@gmail.com on 7 Jun 2008 at 2:21

GoogleCodeExporter commented 8 years ago

Original comment by dmcc...@gmail.com on 8 Jan 2009 at 5:15