Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Zallmann <tzallmann@gitlab.com>2017-11-30 11:26:34 +0300
committerTim Zallmann <tzallmann@gitlab.com>2018-05-07 13:31:21 +0300
commita04ad37e42788d8b9e5c721759b161f39591599a (patch)
treee7b9782e40a330a7476bed4ca6d15f85b0d02f40
parentcfd2118bb17ef490e9016c0d117ab150491c26cc (diff)
Added threshhold for drag simulation
-rw-r--r--app/assets/javascripts/test_utils/simulate_drag.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/test_utils/simulate_drag.js b/app/assets/javascripts/test_utils/simulate_drag.js
index f1998279ba7..b8420e676f5 100644
--- a/app/assets/javascripts/test_utils/simulate_drag.js
+++ b/app/assets/javascripts/test_utils/simulate_drag.js
@@ -104,6 +104,12 @@ export default function simulateDrag(options) {
if (options.ontap) options.ontap();
window.SIMULATE_DRAG_ACTIVE = 1;
+ // New Sortable needs a little bit of treshhold
+ if (options.to.index < options.from.index) {
+ toRect.cy -= 20;
+ } else {
+ toRect.cy += 20;
+ }
if (options.to.index === 0) {
toRect.cy = firstRect.y - 50;
} else if (isLast(options.to)) {