[
https://issues.apache.org/jira/browse/CB-9365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14729257#comment-14729257
]
ASF GitHub Bot commented on CB-9365:
------------------------------------
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-plugin-vibration/pull/38#discussion_r38659073
--- Diff: src/windows/VibrationProxy.js ---
@@ -60,12 +61,43 @@ if (VibrationDevice) {
fail(e);
}
},
- vibrateWithPattern: function(success, fail, args) {
- // TODO: Implement with setTimeout.
- fail('"vibrateWithPattern" is unsupported by this platform.');
+ vibrateWithPattern: function (success, fail, args) {
+ // Cancel current vibrations first
+ module.exports.cancelVibration(function () {
+ // Removes the first zero
+ if (args[0] && args[0][0] === 0) {
--- End diff --
Can we factor out args[0] to a more meaningful variable name?
> Add support for 'vibrateWithPattern' to Windows Phone 8.1 / Windows 10
> ----------------------------------------------------------------------
>
> Key: CB-9365
> URL: https://issues.apache.org/jira/browse/CB-9365
> Project: Apache Cordova
> Issue Type: Bug
> Components: Plugin Vibration
> Reporter: Rob Paveza
> Assignee: Sergey Shakhnazarov
> Priority: Minor
>
> 'vibrateWithPattern' is supported by C# component in wp8, but needs to be
> migrated to Windows Phone 8.1.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]