|
steampunk clock/calendar yahoo widget - part 9 |
|
|
|
Thursday, 18 November 2010 |
|
The slider now works as it should, intuitively on a keypress and drag. I
had been mistakenly using onMouseDown and onMouseMove events and they
seem to be mutually exclusive. After you have hit a mousedown event
Javascript ignores any subsequent mouse moves, so dragging that way did
not work. I found out about the OnMouseDrag event entirely by mistake
when looking around for posible fixes. Remember, I am new to event
driven programming going straight from Quickbasic 4.5 and DCL on VMS, I
did do some Visualbasic programming but have forgotten loads!. Also much
of what I had previously learnt has no bearing on Javascript
programming. Took a while to figure it out but as soon as I had the
solution in my hand it was easy to implement and worked first time.
I've removed the pendulum for the moment whist I figure out how to do
the acceleration and deceleration onthe start and end of the swing. I've
also added it the list of widgets on Yahoo, eventually they may approve
it and it will go live.
|
|
Last Updated ( Friday, 16 September 2011 )
|