Discrepancy in Docs vs. Downloaded Code? (Draggables: RevertDuration)

Discrepancy in Docs vs. Downloaded Code? (Draggables: RevertDuration)


I'm just beginning to experiment with UI - draggables in particular.
The docs at http://docs.jquery.com/UI/Draggables/draggable#options say
that "revertDuration" is an option, but the downloaded code and the
code at http://dev.jquery.com/view/tags/ui/latest/ui/ui.draggable.js
do not reflect this.
I see that the change was made to introduce this option two weeks ago:
http://ui.jquery.com/bugs/changeset/484
Is the documentation out of sync with the downloadable code? How do I
know which parts of the documentation I can trust?
In examining the draggable code to find the source of the problem, I
also have a few comments.
In the affected line:
$(this.helper).animate(this.originalPosition,
parseInt(this.options.revertDuration, 10) || 500,
1) why the parseInt call? It's much slower and more bytes than just
doing this:
$(this.helper).animate(this.originalPosition,
+this.options.revertDuration || 500,
This could be said of all the unnecessary parseInt calls in the code.
2) What if I want my revertDuration to be 0? This will "or" it and set
it to the default 500 instead because 0 is falsey.
3) Instead of hard-coding defaults into the code, they should be made
as properties of the jQuery.ui.draggabe namespace, IMO. This way I
could over-ride the defaults in code my own rather than having to set
them all the time.
Despite these critiques, I've found the code to work pretty well in my
target environment, and it will certainly simplify some of the
development I need to get done quickly. Thanks!
Matt Kruse