Fixed handleGesture by moving it up

This commit is contained in:
Tracker-Friendly 2024-07-02 18:23:52 +01:00
parent ac2fd60bf7
commit 1c0ccfc6bf
1 changed files with 26 additions and 26 deletions

View File

@ -84,6 +84,32 @@ document.addEventListener("DOMContentLoaded", function() {
})
let noteBox = document.getElementsByClassName("pell-content")[0]
function handleGesture() {
if (indiv) {
indiv = false
notesBar.style.width = "100%";
noteBoxDiv.style.width = "0px"
if (selectedNote !== 0) {
noteBoxDiv.readOnly = true
}
notesDiv.classList.remove("hidden")
noteBoxDiv.classList.add("hidden")
backButton.classList.add("hidden")
newNote.classList.remove("hidden")
} else {
indiv = true
noteBoxDiv.style.width = "100%";
notesBar.style.width = "0px"
if (selectedNote !== 0) {
noteBoxDiv.readOnly = false
}
notesDiv.classList.add("hidden")
noteBoxDiv.classList.remove("hidden")
backButton.classList.remove("hidden")
newNote.classList.add("hidden")
}
}
if (/Android|iPhone|iPod/i.test(navigator.userAgent)) {
mobile = true
noteBoxDiv.classList.add("mobile")
@ -122,32 +148,6 @@ document.addEventListener("DOMContentLoaded", function() {
}, false);
}
function handleGesture() {
if (indiv) {
indiv = false
notesBar.style.width = "100%";
noteBoxDiv.style.width = "0px"
if (selectedNote !== 0) {
noteBoxDiv.readOnly = true
}
notesDiv.classList.remove("hidden")
noteBoxDiv.classList.add("hidden")
backButton.classList.add("hidden")
newNote.classList.remove("hidden")
} else {
indiv = true
noteBoxDiv.style.width = "100%";
notesBar.style.width = "0px"
if (selectedNote !== 0) {
noteBoxDiv.readOnly = false
}
notesDiv.classList.add("hidden")
noteBoxDiv.classList.remove("hidden")
backButton.classList.remove("hidden")
newNote.classList.add("hidden")
}
}
noteBox.innerText = ""
noteBox.readOnly = true