summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsimon <vesspa0330@gmail.com>2025-07-16 11:18:46 -0400
committersimon <vesspa0330@gmail.com>2025-07-16 11:18:46 -0400
commita6fecaaa443eda3063446b5780c694054be7f6dd (patch)
tree4e71a188b5ec54540f5e1cf8f86cd16a16f6bb3a
parent597e995f8904a507f2972937857d0c49d006d089 (diff)
efficient reordering is fully functional!! :)
-rw-r--r--startpage.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/startpage.html b/startpage.html
index bba145b..1fe9f78 100644
--- a/startpage.html
+++ b/startpage.html
@@ -1926,6 +1926,10 @@
document.getElementById("containers").insertAdjacentElement("beforeend", clickedListingCopy);
}
+ console.log("current" + currentIndex);
+ console.log("destination" + destinationIndex);
+ console.log("zindexmap BEFORE: ", zIndexMap);
+
let destinationContainer = containerDataMap.get(zIndexMap.get(destinationIndex));
// swap container z-indexes
@@ -1933,11 +1937,12 @@
document.getElementById(containerId).style.zIndex = destinationIndex;
// save changes to map
- zIndexMap.set(currentIndex, zIndexMap.get(destinationIndex));
+ zIndexMap.set(String(currentIndex), zIndexMap.get(destinationIndex));
zIndexMap.set(destinationIndex, movingContainer.id);
- // save new indexes direcly to affected containers
+ console.log("zindexmap AFTER: ", zIndexMap);
+ // save new indexes direcly to affected containers
movingContainer.containerSettings.zIndex = destinationIndex;
movingContainer.addSettingsMenuEventListeners();