Files
Ammaar Reshi d6025af146 Initial commit
2025-01-04 14:06:53 +00:00

26 lines
641 B
JavaScript

import { isDragging } from "./is-active";
export 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;
};
}
}
}
//# sourceMappingURL=set-active.js.map