Zoom Again Added to Calender View with + and - key
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user