사용성 개선
This commit is contained in:
parent
947e376c29
commit
4c692a01a5
1 changed files with 12 additions and 12 deletions
|
|
@ -74,18 +74,18 @@ export default function DraggableWindose({ targetPosition, isVisible, onClose, o
|
|||
};
|
||||
}, [isDragging, dragOffset, shakeCount]);
|
||||
|
||||
useEffect(() => {
|
||||
if (isDragging || targetPosition) return;
|
||||
// useEffect(() => {
|
||||
// if (isDragging || targetPosition) return;
|
||||
|
||||
const interval = setInterval(() => {
|
||||
setPosition({
|
||||
x: Math.random() * (window.innerWidth - 500),
|
||||
y: Math.random() * (window.innerHeight - 400),
|
||||
});
|
||||
}, 500);
|
||||
// const interval = setInterval(() => {
|
||||
// setPosition({
|
||||
// x: Math.random() * (window.innerWidth - 500),
|
||||
// y: Math.random() * (window.innerHeight - 400),
|
||||
// });
|
||||
// }, 500);
|
||||
|
||||
return () => clearInterval(interval);
|
||||
}, [isDragging, targetPosition]);
|
||||
// return () => clearInterval(interval);
|
||||
// }, [isDragging, targetPosition]);
|
||||
|
||||
useEffect(() => {
|
||||
if (targetPosition && !isDragging) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue