From 2489989304fe2241610136c5efdb894f4edfb71b Mon Sep 17 00:00:00 2001
From: PatrikB
Date: Mon, 24 Jun 2024 04:30:10 +0200
Subject: [PATCH] Expermineting to drag results
---
api/ui/Rearranger.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/api/ui/Rearranger.php b/api/ui/Rearranger.php
index 1358debf0c..ef0044afe6 100644
--- a/api/ui/Rearranger.php
+++ b/api/ui/Rearranger.php
@@ -32,8 +32,7 @@ public function seekAndSwap($array, $goal, $direction) {
$temparray = $array;
$tempkey = $goalkey;
echo "Element found inside this array:\n";
- print_r($element, false);
- echo "\nInitiating swap.. Key: " . $goalkey . "\n";
+ print_r($array, false);
break;
}
else {
@@ -43,6 +42,7 @@ public function seekAndSwap($array, $goal, $direction) {
}
}
if(isset($temparray) && isset($tempkey)) {
+ echo "\nInitiating swap.. Key: " . $goalkey . "\n";
return $this->swap($temparray, $goal, $tempkey, $direction);
}
}
@@ -61,6 +61,8 @@ public function searchInside ($subarray, $goal) {
return false;
}
public function swap($array, $goal, $goalkey, $direction) {
+ echo "swap received this array: \n";
+ print_r($array, false);
$temp = '';
$tempkey = 0;
$counter = 0;