fix removePoppersOnDrag
This commit is contained in:
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);
|
||||
|
Loading…
Reference in New Issue
Block a user