HI,

A while back I raised several issues with the slider component, if you happen 
if fix any of these issues please close them. [1][2][3][4][5]

I note for instance the slider still incorrectly gives the value NaN when you 
click on the track.
The issue arises in this line in the calcValFromMousePosition method:

var deltaX:Number = (useOffset ? event.offsetX : event.clientX) - origin;
 
As when you click on the track offsetX is not contained in the event. 

A fix (in the PR) is to change the line to:
var deltaX:Number = (event.offsetX && useOffset ? event.offsetX : 
event.clientX) - origin;

I would normally use event.offsetX !== undefined rather than just event.offsetX 
but this project seems to have an aversion to using the strict equality / 
inequality operators.

There may of course be other ways to fix this issue.

Thanks,
Justin

1. https://github.com/apache/royale-asjs/issues/86
2. https://github.com/apache/royale-asjs/issues/84
3. https://github.com/apache/royale-asjs/issues/83
4. https://github.com/apache/royale-asjs/issues/82
5. https://github.com/apache/royale-asjs/issues/81

Reply via email to