You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Lorin Beer (JIRA)" <ji...@apache.org> on 2014/08/14 22:24:18 UTC

[jira] [Resolved] (CB-7313) Misleading documentation in Device Motion Plugin

     [ https://issues.apache.org/jira/browse/CB-7313?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lorin Beer resolved CB-7313.
----------------------------

    Resolution: Fixed

quick fix, commit in comments

> Misleading documentation in Device Motion Plugin
> ------------------------------------------------
>
>                 Key: CB-7313
>                 URL: https://issues.apache.org/jira/browse/CB-7313
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Device Motion
>            Reporter: Lorin Beer
>            Assignee: Lorin Beer
>            Priority: Minor
>
> device motion documentation reads
> {code}
> The returned watch ID references the accelerometer's watch interval, and can be used with navigator.accelerometer.clearWatch to stop watching the accelerometer.
> var watchID = navigator.accelerometer.watchAcceleration(accelerometerSuccess,
>                                                        accelerometerError,
>                                                        [accelerometerOptions]);
> {code}
> last line indicates an array is the expected argument, which causes the api to return an error
> it should read
> {code}
> accelerometerOptions);
> {code}
> the rest of watchAccel correctly documents accelerometerOptions as an object.
> Also noted that period optional member is incorrectly called 'frequency'.



--
This message was sent by Atlassian JIRA
(v6.2#6252)