Skip to content
This repository has been archived by the owner on Nov 27, 2019. It is now read-only.

Commit

Permalink
dot notations, ngInject comments removed, favicon added
Browse files Browse the repository at this point in the history
  • Loading branch information
luckylooke committed Dec 30, 2015
1 parent e95b220 commit 69905e6
Show file tree
Hide file tree
Showing 13 changed files with 44 additions and 353 deletions.
297 changes: 0 additions & 297 deletions codeclimate-config.patch

This file was deleted.

17 changes: 7 additions & 10 deletions dist/dragular.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,9 @@ module.exports = angular.module('dragularModule', []);

var dragularModule = require('./dragularModule');

/**
* @ngInject
*/

dragularModule.factory('dragularService', ['$rootScope', function dragula($rootScope) {
dragularModule.factory('dragularService', ["$rootScope", function dragula($rootScope) {

var shared = { // function returned as service
var shared = {
classesCache: {}, // classes lookup cache
containersCtx: {}, // containers model
containers: {}, // containers managed by the drake
Expand Down Expand Up @@ -102,6 +98,7 @@ dragularModule.factory('dragularService', ['$rootScope', function dragula($rootS
lastElementBehindCursor: null, // last element behind cursor
grabbed: null // holds mousedown context until first mousemove
},
// function returned as service
serviceFn = function(initialContainers, options) {

if (arguments.length === 1 && !Array.isArray(initialContainers) && !angular.isElement(initialContainers) && !initialContainers[0] && typeof initialContainers !== 'string') {
Expand Down Expand Up @@ -494,7 +491,7 @@ dragularModule.factory('dragularService', ['$rootScope', function dragula($rootS
shared.target = null;

if (shared.lastElementBehindCursor) {
fireEvent(shared.lastElementBehindCursor, shared.dragOverEvents['dragularrelease'], elementBehindCursor);
fireEvent(shared.lastElementBehindCursor, shared.dragOverEvents.dragularrelease, elementBehindCursor);
}

if (o.scope) {
Expand Down Expand Up @@ -660,7 +657,7 @@ dragularModule.factory('dragularService', ['$rootScope', function dragula($rootS
break;
}
if (!shared.targetCtx) {
shared.targetCtx = shared.containersCtx['dragularCommon'][shared.containers['dragularCommon'].indexOf(target)];
shared.targetCtx = shared.containersCtx.dragularCommon[shared.containersdragularCommon.indexOf(target)];
}
}

Expand Down Expand Up @@ -728,9 +725,9 @@ dragularModule.factory('dragularService', ['$rootScope', function dragula($rootS
changed = dropTarget !== shared.lastDropTarget;

if (elementBehindCursor !== shared.lastElementBehindCursor) {
fireEvent(elementBehindCursor, shared.dragOverEvents['dragularenter'], !!dropTarget);
fireEvent(elementBehindCursor, shared.dragOverEvents.dragularenter, !!dropTarget);
if (shared.lastElementBehindCursor) {
fireEvent(shared.lastElementBehindCursor, shared.dragOverEvents['dragularleave'], elementBehindCursor);
fireEvent(shared.lastElementBehindCursor, shared.dragOverEvents.dragularleave, elementBehindCursor);
}
shared.lastElementBehindCursor = elementBehindCursor;
}
Expand Down
Loading

0 comments on commit 69905e6

Please sign in to comment.