Zoom Again Added to Calender View with + and - key

This commit is contained in:
brausjonas
2023-05-26 16:27:20 +02:00
parent d5443c87d0
commit 866dfe9e2b
3 changed files with 110100 additions and 0 deletions
+17
View File
@@ -193,6 +193,23 @@ export default function CalenderView(p) {
scrollRef.current.scrollTop = 600;
window.addEventListener("contextmenu", (e) => (e.preventDefault()))
window.addEventListener("keypress", (e) => {
if(e.key === "+")
{
scrollRef.current.scrollTop = scrollRef.current.scrollTop + 100;
cellHeight += 2
}
else if(e.key === "-")
{
if(cellHeight - 2 >= 8)
{
scrollRef.current.scrollTop = scrollRef.current.scrollTop - 100;
cellHeight -= 2
}
}
})
setInterval(function(){
if (selectedElement == null){
readEntries()