Mission Control Dashboard - Initial implementation
This commit is contained in:
29
node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs
generated
vendored
Normal file
29
node_modules/motion-dom/dist/es/gestures/drag/state/set-active.mjs
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
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 };
|
||||
//# sourceMappingURL=set-active.mjs.map
|
||||
Reference in New Issue
Block a user