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

Commit

Permalink
fixed #129 - drag stucks on no-container release
Browse files Browse the repository at this point in the history
  • Loading branch information
luckylooke committed Mar 27, 2017
1 parent 4449b0a commit cdf6632
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
1 change: 1 addition & 0 deletions changelog.markdown
Expand Up @@ -4,6 +4,7 @@

# 4.3.3
- fixed #131 drags mixed with scrolling (caused by chrome update)
- fixed #129 drag stucks on no-container release

# 4.3.2 War of the Worlds
- fixed #120 isContainer example not working
Expand Down
19 changes: 8 additions & 11 deletions docs/dist/examples.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/dist/examples.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/dist/examples.min.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions docs/src/examples/templates.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion gulpfile.js
Expand Up @@ -208,10 +208,12 @@ gulp.task('templates:docs', function() {
*/
gulp.task('watch', ['serve'], function() {
gulp.watch(config.dragular.styles, ['styles']);
gulp.watch(config.docs.scripts, ['scripts']);
gulp.watch(config.dragular.scripts, ['scripts']);
});

gulp.task('watch:docs', ['serve'], function() {
gulp.watch(config.dragular.styles, ['styles']);
gulp.watch(config.dragular.scripts, ['scripts']);
gulp.watch(config.docs.styles, ['styles']);
gulp.watch(config.docs.scripts, ['scripts']);
gulp.watch(config.docs.templates, ['templates:docs']);
Expand Down
6 changes: 3 additions & 3 deletions src/dragularService.js
Expand Up @@ -538,7 +538,7 @@ var dragularService = function ($rootScope, $compile) {
}

if (shared.sourceModel && !isInitialPlacement(target)) {
if (shared.targetCtx.fm){ // target has filtered model
if (shared.targetCtx && shared.targetCtx.fm){ // target has filtered model
// convert index from index-in-filteredModel to index-in-model
dropIndex = shared.targetCtx.m.indexOf(shared.targetCtx.fm[dropIndex]);
}
Expand All @@ -556,7 +556,7 @@ var dragularService = function ($rootScope, $compile) {
shared.dropElmModel = shared.copy && !o.dontCopyModel ? angular.copy(shared.sourceModel[shared.initialIndex]) : shared.sourceModel[shared.initialIndex];

if (!shared.tempModel) {
shared.targetModel = shared.targetCtx.m;
shared.targetModel = ( shared.targetCtx && shared.targetCtx.m ) || shared.sourceModel;
} else {
shared.targetModel = shared.tempModel;
}
Expand Down Expand Up @@ -717,7 +717,7 @@ var dragularService = function ($rootScope, $compile) {

while (i--) { // for each namespace
nameSpace = o.nameSpace[i];
if (shared.containers[nameSpace].indexOf(target) !== -1) {
if (shared.containers[nameSpace].indexOf(target) != -1) {
targetCtx = getTargetCtx(nameSpace);
break;
}
Expand Down

0 comments on commit cdf6632

Please sign in to comment.