yangdx commited on
Commit
4093704
·
1 Parent(s): d2a7b73

Remove refresh layout button and related code

Browse files
lightrag_webui/src/components/graph/LayoutsControl.tsx CHANGED
@@ -15,7 +15,7 @@ import { Command, CommandGroup, CommandItem, CommandList } from '@/components/ui
15
  import { controlButtonVariant } from '@/lib/constants'
16
  import { useSettingsStore } from '@/stores/settings'
17
 
18
- import { GripIcon, PlayIcon, PauseIcon, RefreshCwIcon } from 'lucide-react'
19
  import { useTranslation } from 'react-i18next'
20
 
21
  type LayoutName =
@@ -279,23 +279,8 @@ const LayoutsControl = () => {
279
  [layouts, sigma]
280
  )
281
 
282
- const refreshLayout = useCallback(() => {
283
- if (!sigma) return
284
- const graph = sigma.getGraph()
285
- const positions = layoutForceAtlas2.positions()
286
- animateNodes(graph, positions, { duration: 500 })
287
- }, [sigma, layoutForceAtlas2])
288
-
289
  return (
290
  <>
291
- <Button
292
- variant={controlButtonVariant}
293
- tooltip={t('graphPanel.sideBar.settings.refreshLayout')}
294
- size="icon"
295
- onClick={refreshLayout}
296
- >
297
- <RefreshCwIcon />
298
- </Button>
299
  <div>
300
  {layouts[layout] && 'worker' in layouts[layout] && (
301
  <WorkerLayoutControl
 
15
  import { controlButtonVariant } from '@/lib/constants'
16
  import { useSettingsStore } from '@/stores/settings'
17
 
18
+ import { GripIcon, PlayIcon, PauseIcon } from 'lucide-react'
19
  import { useTranslation } from 'react-i18next'
20
 
21
  type LayoutName =
 
279
  [layouts, sigma]
280
  )
281
 
 
 
 
 
 
 
 
282
  return (
283
  <>
 
 
 
 
 
 
 
 
284
  <div>
285
  {layouts[layout] && 'worker' in layouts[layout] && (
286
  <WorkerLayoutControl