Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

namespace fix for bg-location #1451

Open
wants to merge 2 commits into
base: dev-next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
378 changes: 351 additions & 27 deletions demo/www/lib/ngCordova/dist/ng-cordova.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions demo/www/lib/ngCordova/dist/ng-cordova.min.js

Large diffs are not rendered by default.

378 changes: 351 additions & 27 deletions dist/ng-cordova.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/ng-cordova.min.js

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions src/plugins/3dtouch.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@

angular.module('ngCordova.plugins.3dtouch', [])

.factory('$cordova3DTouch', ['$q', function($q) {
.factory('$cordova3DTouch', ['$q', function ($q) {
var quickActions = [];
var quickActionHandler = {};

var createQuickActionHandler = function(quickActionHandler) {
var createQuickActionHandler = function (quickActionHandler) {
return function (payload) {
for (var key in quickActionHandler) {
if (payload.type === key) {
Expand Down Expand Up @@ -52,7 +52,7 @@ angular.module('ngCordova.plugins.3dtouch', [])
* @param function callback (optional)
* @return promise
*/
addQuickAction: function(type, title, iconType, iconTemplate, subtitle, callback) {
addQuickAction: function (type, title, iconType, iconTemplate, subtitle, callback) {
var deferred = $q.defer();

var quickAction = {
Expand All @@ -69,14 +69,14 @@ angular.module('ngCordova.plugins.3dtouch', [])
quickAction.iconTemplate = iconTemplate;
}

this.isAvailable().then(function() {
this.isAvailable().then(function () {
quickActions.push(quickAction);
quickActionHandler[type] = callback;
window.ThreeDeeTouch.configureQuickActions(quickActions);
window.ThreeDeeTouch.onHomeIconPressed = createQuickActionHandler(quickActionHandler);
deferred.resolve(quickActions);
},
function(err) {
function (err) {
deferred.reject(err);
});

Expand All @@ -90,15 +90,15 @@ angular.module('ngCordova.plugins.3dtouch', [])
* @param function callback
* @return promise
*/
addQuickActionHandler: function(type, callback) {
addQuickActionHandler: function (type, callback) {
var deferred = $q.defer();

this.isAvailable().then(function() {
this.isAvailable().then(function () {
quickActionHandler[type] = callback;
window.ThreeDeeTouch.onHomeIconPressed = createQuickActionHandler(quickActionHandler);
deferred.resolve(true);
},
function(err) {
function (err) {
deferred.reject(err);
});

Expand All @@ -110,14 +110,14 @@ angular.module('ngCordova.plugins.3dtouch', [])
*
* @return bool
*/
enableLinkPreview: function() {
enableLinkPreview: function () {
var deferred = $q.defer();

this.isAvailable().then(function() {
this.isAvailable().then(function () {
window.ThreeDeeTouch.enableLinkPreview();
deferred.resolve(true);
},
function(err) {
function (err) {
deferred.reject(err);
});

Expand All @@ -130,14 +130,14 @@ angular.module('ngCordova.plugins.3dtouch', [])
* @param function callback
* @return promise
*/
addForceTouchHandler: function(callback) {
addForceTouchHandler: function (callback) {
var deferred = $q.defer();

this.isAvailable().then(function() {
this.isAvailable().then(function () {
window.ThreeDeeTouch.watchForceTouches(callback);
deferred.resolve(true);
},
function(err) {
function (err) {
deferred.reject(err);
});

Expand Down
Loading