yangdx commited on
Commit
7c4fa88
·
1 Parent(s): c3d99d0

Fix linting

Browse files
lightrag_webui/src/features/DocumentManager.tsx CHANGED
@@ -126,18 +126,18 @@ export default function DocumentManager() {
126
  // Add tooltip position adjustment based on mouse position
127
  useEffect(() => {
128
  if (!docs) return;
129
-
130
  // Function to handle mouse movement
131
  const handleMouseMove = (event: MouseEvent) => {
132
  const cardContent = document.querySelector<HTMLElement>('.flex-1.relative.p-0');
133
  if (!cardContent) return;
134
-
135
  const cardRect = cardContent.getBoundingClientRect();
136
  const cardMiddleY = cardRect.top + cardRect.height / 2;
137
-
138
  // Get all visible tooltips
139
  const visibleTooltips = document.querySelectorAll<HTMLElement>('.group:hover > div[class*="invisible group-hover:visible absolute"]');
140
-
141
  visibleTooltips.forEach(tooltip => {
142
  // If mouse is in the bottom half of the card, show tooltip above
143
  if (event.clientY > cardMiddleY) {
@@ -147,10 +147,10 @@ export default function DocumentManager() {
147
  }
148
  });
149
  };
150
-
151
  // Add mouse move listener to the document
152
  document.addEventListener('mousemove', handleMouseMove);
153
-
154
  return () => {
155
  document.removeEventListener('mousemove', handleMouseMove);
156
  };
 
126
  // Add tooltip position adjustment based on mouse position
127
  useEffect(() => {
128
  if (!docs) return;
129
+
130
  // Function to handle mouse movement
131
  const handleMouseMove = (event: MouseEvent) => {
132
  const cardContent = document.querySelector<HTMLElement>('.flex-1.relative.p-0');
133
  if (!cardContent) return;
134
+
135
  const cardRect = cardContent.getBoundingClientRect();
136
  const cardMiddleY = cardRect.top + cardRect.height / 2;
137
+
138
  // Get all visible tooltips
139
  const visibleTooltips = document.querySelectorAll<HTMLElement>('.group:hover > div[class*="invisible group-hover:visible absolute"]');
140
+
141
  visibleTooltips.forEach(tooltip => {
142
  // If mouse is in the bottom half of the card, show tooltip above
143
  if (event.clientY > cardMiddleY) {
 
147
  }
148
  });
149
  };
150
+
151
  // Add mouse move listener to the document
152
  document.addEventListener('mousemove', handleMouseMove);
153
+
154
  return () => {
155
  document.removeEventListener('mousemove', handleMouseMove);
156
  };