yangdx
commited on
Commit
·
9defefd
1
Parent(s):
2e179f3
Update comment translations to English
Browse files
lightrag_webui/src/components/graph/GraphLabels.tsx
CHANGED
@@ -100,6 +100,7 @@ const GraphLabels = () => {
|
|
100 |
onChange={(newLabel) => {
|
101 |
const currentLabel = useSettingsStore.getState().queryLabel
|
102 |
|
|
|
103 |
if (newLabel === '...') {
|
104 |
newLabel = '*'
|
105 |
}
|
@@ -120,7 +121,7 @@ const GraphLabels = () => {
|
|
120 |
}
|
121 |
|
122 |
if (newLabel === currentLabel && newLabel !== '*') {
|
123 |
-
//
|
124 |
useSettingsStore.getState().setQueryLabel('*')
|
125 |
} else {
|
126 |
useSettingsStore.getState().setQueryLabel(newLabel)
|
|
|
100 |
onChange={(newLabel) => {
|
101 |
const currentLabel = useSettingsStore.getState().queryLabel
|
102 |
|
103 |
+
// select the last item means query all
|
104 |
if (newLabel === '...') {
|
105 |
newLabel = '*'
|
106 |
}
|
|
|
121 |
}
|
122 |
|
123 |
if (newLabel === currentLabel && newLabel !== '*') {
|
124 |
+
// reselect the same itme means qery all
|
125 |
useSettingsStore.getState().setQueryLabel('*')
|
126 |
} else {
|
127 |
useSettingsStore.getState().setQueryLabel(newLabel)
|
lightrag_webui/src/stores/graph.ts
CHANGED
@@ -173,7 +173,7 @@ const useGraphStoreBase = create<GraphState>()((set, get) => ({
|
|
173 |
}),
|
174 |
|
175 |
setSigmaGraph: (sigmaGraph: DirectedGraph | null) => {
|
176 |
-
//
|
177 |
set({ sigmaGraph });
|
178 |
},
|
179 |
|
|
|
173 |
}),
|
174 |
|
175 |
setSigmaGraph: (sigmaGraph: DirectedGraph | null) => {
|
176 |
+
// Replace graph instance, no need to keep WebGL context
|
177 |
set({ sigmaGraph });
|
178 |
},
|
179 |
|