From 6985fcda8db71e73b3778a0c7edc127ec443cb14 Mon Sep 17 00:00:00 2001
From: PatrikB
Date: Mon, 24 Jun 2024 04:00:49 +0200
Subject: [PATCH] Expermineting to drag results
---
api/ui/Rearranger.php | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/api/ui/Rearranger.php b/api/ui/Rearranger.php
index 2b2e88fc49..eaf0f63619 100644
--- a/api/ui/Rearranger.php
+++ b/api/ui/Rearranger.php
@@ -29,9 +29,10 @@ public function seekAndSwap($array, $goal, $direction) {
foreach ($array as $key => $value) {
$goalkey = $this->searchInside($value, $goal);
if ($goalkey >= 0) {
- echo "Goal key is " . $goalkey . "\n";
- echo "Initiating swap.. \n";
$temparray = $array;
+ $tempkey = $key;
+ echo "Goal key is " . $tempkey . "\n";
+ echo "Initiating swap.. \n";
break;
} else {
foreach ($array as $element) {