From 9ce641bd75c4cd23c69cfc224931d871647b4f6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Wed, 23 Feb 2011 12:13:53 +0000 Subject: [PATCH] better API doc strings in the Kinetic class, no functional change git-svn-id: http://svn.openlayers.org/trunk/openlayers@11309 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- lib/OpenLayers/Kinetic.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lib/OpenLayers/Kinetic.js b/lib/OpenLayers/Kinetic.js index 8447f4a647..7b6a3e7474 100644 --- a/lib/OpenLayers/Kinetic.js +++ b/lib/OpenLayers/Kinetic.js @@ -63,7 +63,6 @@ OpenLayers.Kinetic = OpenLayers.Class({ /** * Method: begin - * * Begins the dragging. */ begin: function() { @@ -74,8 +73,10 @@ OpenLayers.Kinetic = OpenLayers.Class({ /** * Method: update - * * Updates during the dragging. + * + * Parameters: + * xy - {} The new position. */ update: function(xy) { this.points.unshift({xy: xy, tick: new Date().getTime()}); @@ -86,8 +87,15 @@ OpenLayers.Kinetic = OpenLayers.Class({ /** * Method: end - * * Ends the dragging, start the kinetic. + * + * Parameters: + * xy - {} 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 @@ OpenLayers.Kinetic = OpenLayers.Class({ /** * 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;