mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-14 15:15:22 +03:00
touch events
This commit is contained in:
parent
87f3e126aa
commit
cc44c06040
@ -547,11 +547,20 @@ function useDraggableElement({
|
|||||||
timelineElement.addEventListener("scroll", handleUserInteraction);
|
timelineElement.addEventListener("scroll", handleUserInteraction);
|
||||||
timelineElement.addEventListener("mousedown", handleUserInteraction);
|
timelineElement.addEventListener("mousedown", handleUserInteraction);
|
||||||
timelineElement.addEventListener("mouseup", handleUserInteraction);
|
timelineElement.addEventListener("mouseup", handleUserInteraction);
|
||||||
|
timelineElement.addEventListener("touchstart", handleUserInteraction);
|
||||||
|
timelineElement.addEventListener("touchmove", handleUserInteraction);
|
||||||
|
timelineElement.addEventListener("touchend", handleUserInteraction);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
timelineElement.removeEventListener("scroll", handleUserInteraction);
|
timelineElement.removeEventListener("scroll", handleUserInteraction);
|
||||||
timelineElement.removeEventListener("mousedown", handleUserInteraction);
|
timelineElement.removeEventListener("mousedown", handleUserInteraction);
|
||||||
timelineElement.removeEventListener("mouseup", handleUserInteraction);
|
timelineElement.removeEventListener("mouseup", handleUserInteraction);
|
||||||
|
timelineElement.removeEventListener(
|
||||||
|
"touchstart",
|
||||||
|
handleUserInteraction,
|
||||||
|
);
|
||||||
|
timelineElement.removeEventListener("touchmove", handleUserInteraction);
|
||||||
|
timelineElement.removeEventListener("touchend", handleUserInteraction);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, [timelineRef]);
|
}, [timelineRef]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user