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

Problems with bower install and suggestion for a callback #14

Open
Kartoffelsalat opened this issue Sep 24, 2014 · 1 comment
Open

Problems with bower install and suggestion for a callback #14

Kartoffelsalat opened this issue Sep 24, 2014 · 1 comment

Comments

@Kartoffelsalat
Copy link

I tried it with angular 1.2.25 and 1.3.x, the bower installed hammerjs (>1.0.5) and angular-hammer(>1.0.1) and i got some errors, angular complains about dom manipulating.

Another suggestion: Do you think u can add a callback on stopevent?
callback(startindex, endindex)

I did something like this in your code: line 334 - 350

var $endindex = false;   

collection = $scope.$eval(rhs);
obj = collection.splice($index, 1);
if (this.offset < 0) {
    collection.splice($index + this.offset + 1, 0, obj[0]);
    $endindex = $index + this.offset + 1;
} else if (this.offset > 0) {
    collection.splice($index + this.offset - 1, 0, obj[0]);
    $endindex = $index + this.offset - 1;
}
    $scope.$emit('ngrr-reordered');

if (typeof $scope.onReordered === 'function') {
    $scope.onReordered($index, $endindex);
}

And defined the onReordered function in my controller.

@SimeonC
Copy link
Owner

SimeonC commented Sep 30, 2014

OK, I think this is a duplicate of #15 - can you confirm?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants