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

Commit

Permalink
Tuch#41 Fixed scrolling breakes draggable element
Browse files Browse the repository at this point in the history
  • Loading branch information
artar94 committed Jan 11, 2017
1 parent 85d5568 commit 9143698
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 12 deletions.
13 changes: 8 additions & 5 deletions dist/angular-dnd.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,14 +600,17 @@ extend($.prototype, {

dndGetFirstNotStaticParent: function() {
var ret, position, parents = this.dndClosest();
var self = this[0];

var parentExists = false;
forEach(parents, function(element) {
if (!parentExists && element !== self) {
position = $(element).dndCss('position');

position = $(element).dndCss('position');

if ( position === 'absolute' || position === 'relative' || position === 'fixed' ) {
ret = element;
return false;
if (position === 'absolute' || position === 'relative' || position === 'fixed') {
ret = element;
parentExists = true;
}
}
});

Expand Down
4 changes: 2 additions & 2 deletions dist/angular-dnd.min.js

Large diffs are not rendered by default.

13 changes: 8 additions & 5 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -598,14 +598,17 @@ extend($.prototype, {

dndGetFirstNotStaticParent: function() {
var ret, position, parents = this.dndClosest();
var self = this[0];

var parentExists = false;
forEach(parents, function(element) {
if (!parentExists && element !== self) {
position = $(element).dndCss('position');

position = $(element).dndCss('position');

if ( position === 'absolute' || position === 'relative' || position === 'fixed' ) {
ret = element;
return false;
if (position === 'absolute' || position === 'relative' || position === 'fixed') {
ret = element;
parentExists = true;
}
}
});

Expand Down
File renamed without changes.

0 comments on commit 9143698

Please sign in to comment.