fix removePoppersOnDrag

This commit is contained in:
nflnkr 2024-01-10 21:28:52 +03:00
parent c673b5be9f
commit d565a50a66

@ -82,16 +82,23 @@ function CsComponent() {
if (!cy) return;
let isPointerDown = false;
let isDragging = false;
const onPointerDown = () => {
isPointerDown = true;
};
const onPointerUp = () => {
if (isPointerDown) recreatePoppers();
if (isDragging) {
isDragging = false;
recreatePoppers();
}
isPointerDown = false;
};
const handleMove = () => {
if (isPointerDown) removeAllPoppers();
if (isPointerDown) {
isDragging = true;
removeAllPoppers();
}
};
cy.on("vmousedown", onPointerDown);