사용성 개선
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]);
|
}, [isDragging, dragOffset, shakeCount]);
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
if (isDragging || targetPosition) return;
|
// if (isDragging || targetPosition) return;
|
||||||
|
|
||||||
const interval = setInterval(() => {
|
// const interval = setInterval(() => {
|
||||||
setPosition({
|
// setPosition({
|
||||||
x: Math.random() * (window.innerWidth - 500),
|
// x: Math.random() * (window.innerWidth - 500),
|
||||||
y: Math.random() * (window.innerHeight - 400),
|
// y: Math.random() * (window.innerHeight - 400),
|
||||||
});
|
// });
|
||||||
}, 500);
|
// }, 500);
|
||||||
|
|
||||||
return () => clearInterval(interval);
|
// return () => clearInterval(interval);
|
||||||
}, [isDragging, targetPosition]);
|
// }, [isDragging, targetPosition]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (targetPosition && !isDragging) {
|
if (targetPosition && !isDragging) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue