e.stopPropagation()}
- >
-
- Inventory
- {items.length} slots
-
-
-
- {items.length === 0 &&
Empty Inventory
}
- {items.map(item => (
-
removeItem(item.id)} />
- ))}
-
+
e.stopPropagation()}
+ >
+ {/* Bubble Tail */}
+
+
+
+
+ Inventory
+ {items.length} slots
+
+
+
+ {items.length === 0 &&
Empty Inventory
}
+ {items.map(item => (
+
removeItem(item.id)} />
+ ))}
)}
diff --git a/src/components/DragContext.jsx b/src/components/DragContext.jsx
index 6e55806..451e272 100644
--- a/src/components/DragContext.jsx
+++ b/src/components/DragContext.jsx
@@ -11,6 +11,16 @@ export const DragProvider = ({ children }) => {
const [cursorPos, setCursorPos] = useState({ x: 0, y: 0 });
const [dropZone, setDropZone] = useState(null);
+ useEffect(() => {
+ if (isDragging) {
+ document.body.style.userSelect = 'none';
+ document.body.style.webkitUserSelect = 'none';
+ } else {
+ document.body.style.userSelect = '';
+ document.body.style.webkitUserSelect = '';
+ }
+ }, [isDragging]);
+
// Global Mouse/Touch Handlers
useEffect(() => {
if (!isDragging) return;
@@ -104,6 +114,10 @@ export const DropZone = ({ onDrop, children, className = "", activeClassName = "
return () => { delete window.__dropZoneRegistry[idRef.current]; };
}, [onDrop]);
+ useEffect(() => {
+ if (!isDragging) setIsOver(false);
+ }, [isDragging]);
+
// Polling or Context-driven active state check would be cleaner, but for now
// we let the Provider setDropZone, and we check if *we* are the active one.
// However, DropZone doesn't know if IT is the active one from context easily without an ID.