fix(sortable): don't trigger sort when dragging in place, fixes #3926
This commit is contained in:
@@ -41,9 +41,9 @@ habitrpg.controller("FiltersCtrl", ['$scope', '$rootScope', 'User',
|
||||
ui.item.sortable.cancel();
|
||||
},
|
||||
stop: function(e, ui) {
|
||||
User.user.ops.sortTag({
|
||||
query: {from: ui.item.sortable.index, to:ui.item.sortable.dropindex}
|
||||
});
|
||||
var from = ui.item.sortable.index, to = ui.item.sortable.dropindex;
|
||||
if (!from || !to) return;
|
||||
User.user.ops.sortTag({query: {from: from, to: to}});
|
||||
},
|
||||
axis: 'x',
|
||||
//distance: 5
|
||||
|
||||
@@ -90,10 +90,9 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
||||
ui.item.sortable.cancel();
|
||||
},
|
||||
stop: function(e, ui) {
|
||||
User.user.ops.sortTask({
|
||||
params: {id: ui.item.scope().task.id},
|
||||
query: {from: ui.item.sortable.index, to:ui.item.sortable.dropindex}
|
||||
});
|
||||
var from = ui.item.sortable.index, to = ui.item.sortable.dropindex;
|
||||
if (!from || !to) return;
|
||||
User.user.ops.sortTask({ params: {id: ui.item.scope().task.id}, query: {from: from, to: to} });
|
||||
},
|
||||
axis: 'y',
|
||||
//distance: 5
|
||||
|
||||
Reference in New Issue
Block a user