[OpenLayers-Commits] r11309 - trunk/openlayers/lib/OpenLayers
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Wed Feb 23 07:13:53 EST 2011
Author: erilem
Date: 2011-02-23 04:13:53 -0800 (Wed, 23 Feb 2011)
New Revision: 11309
Modified:
trunk/openlayers/lib/OpenLayers/Kinetic.js
Log:
better API doc strings in the Kinetic class, no functional change
Modified: trunk/openlayers/lib/OpenLayers/Kinetic.js
===================================================================
--- trunk/openlayers/lib/OpenLayers/Kinetic.js 2011-02-23 12:00:51 UTC (rev 11308)
+++ trunk/openlayers/lib/OpenLayers/Kinetic.js 2011-02-23 12:13:53 UTC (rev 11309)
@@ -63,7 +63,6 @@
/**
* Method: begin
- *
* Begins the dragging.
*/
begin: function() {
@@ -74,8 +73,10 @@
/**
* Method: update
+ * Updates during the dragging.
*
- * Updates during the dragging.
+ * Parameters:
+ * xy - {<OpenLayers.Pixel>} The new position.
*/
update: function(xy) {
this.points.unshift({xy: xy, tick: new Date().getTime()});
@@ -86,8 +87,15 @@
/**
* Method: end
+ * Ends the dragging, start the kinetic.
*
- * Ends the dragging, start the kinetic.
+ * Parameters:
+ * xy - {<OpenLayers.Pixel>} The last position.
+ *
+ * Returns:
+ * {Object} An object with two properties: "speed", and "theta". The
+ * "speed" and "theta" values are to be passed to the move
+ * function when starting the animation.
*/
end: function(xy) {
var last, now = new Date().getTime();
@@ -117,12 +125,13 @@
/**
* Method: move
- *
* Launch the kinetic move pan.
*
* Parameters:
- * info - {Object}
- * callback - arguments x, y (values to pan), end (is the last point)
+ * info - {Object} An object with two properties, "speed", and "theta".
+ * These values are those returned from the "end" call.
+ * callback - {Function} Function called on every step of the animation,
+ * receives x, y (values to pan), end (is the last point).
*/
move: function(info, callback) {
var v0 = info.speed;
More information about the Commits
mailing list