diff --git a/src/lineFeature.js b/src/lineFeature.js index 31d336802e..b1b58e49d0 100644 --- a/src/lineFeature.js +++ b/src/lineFeature.js @@ -85,11 +85,11 @@ var lineFeature = function (arg) { /** * Get/set line accessor. * - * @param {object|function} [val] If specified, use this for the line - * accessor and return the feature. If not specified, return the current - * line. If a function, this is passed `(dataElement, dataIndex)` and - * returns an array of vertex elements. - * @returns {object|function|this} The current line or this feature. + * @param {object|function} [val] If not specified, return the current line + * accessor. If specified, use this for the line accessor and return + * `this`. If a function is given, the function is passed `(dataElement, + * dataIndex)` and returns an array of vertex elements. + * @returns {object|function|this} The current line accessor or this feature. */ this.line = function (val) { if (val === undefined) { @@ -105,10 +105,10 @@ var lineFeature = function (arg) { /** * Get/Set position accessor. * - * @param {object|function} [val] If specified, use this for the position - * accessor and return the feature. If not specified, return the current - * position. If a function, this is called with `(vertexElement, - * vertexIndex, dataElement, dataIndex)`. + * @param {object|function} [val] If not specified, return the current + * position accessor. If specified, use this for the position accessor + * and return `this`. If a function is given, this is called with + * `(vertexElement, vertexIndex, dataElement, dataIndex)`. * @returns {object|function|this} The current position or this feature. */ this.position = function (val) { @@ -263,7 +263,7 @@ var lineFeature = function (arg) { }; /** - * Take a set of data, reduce the number of vertices per linen using the + * Take a set of data, reduce the number of vertices per line using the * Ramer–Douglas–Peucker algorithm, and use the result as the new data. * This changes the instance's data, the position accessor, and the line * accessor. diff --git a/src/polygonFeature.js b/src/polygonFeature.js index 60ec2a066e..36b1ec005c 100644 --- a/src/polygonFeature.js +++ b/src/polygonFeature.js @@ -183,11 +183,12 @@ var polygonFeature = function (arg) { /** * Get/set polygon accessor. * - * @param {object|function} [val] If specified, use this for the polygon - * accessor and return the feature. If not specified, return the current - * polygon. If a function, this is passed `(dataElement, dataIndex)` and - * returns a `geo.polygon`. - * @returns {object|function|this} The current polygon or this feature. + * @param {object|function} [val] If not specified, return the current + * polygon accessor. If specified, use this for the polygon accessor and + * return `this`. If a function is given, the function is passed + * `(dataElement, dataIndex)` and returns a `geo.polygon`. + * @returns {object|function|this} The current polygon accessor or this + * feature. */ this.polygon = function (val) { if (val === undefined) { @@ -204,10 +205,10 @@ var polygonFeature = function (arg) { /** * Get/Set position accessor. * - * @param {object} [val] If specified, use this for the position accessor - * and return the feature. If not specified, return the current - * position. If a function, this is called with `(vertexElement, - * vertexIndex, dataElement, dataIndex)`. + * @param {object|function} [val] If not specified, return the current + * position accessor. If specified, use this for the position accessor + * and return `this`. If a function is given, this is called with + * `(vertexElement, vertexIndex, dataElement, dataIndex)`. * @returns {object|this} The current position or this feature. */ this.position = function (val) {