%PDF- %PDF-
| Direktori : /home/vacivi36/.trash/vacivitta/node_modules/motion-dom/dist/es/gestures/drag/state/ |
| Current File : /home/vacivi36/.trash/vacivitta/node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs |
import { isDragging } from './is-active.mjs';
function setDragLock(axis) {
if (axis === "x" || axis === "y") {
if (isDragging[axis]) {
return null;
}
else {
isDragging[axis] = true;
return () => {
isDragging[axis] = false;
};
}
}
else {
if (isDragging.x || isDragging.y) {
return null;
}
else {
isDragging.x = isDragging.y = true;
return () => {
isDragging.x = isDragging.y = false;
};
}
}
}
export { setDragLock };