From 3cb7fbb13f54b1a06b4c5a8ffdfa031c418e94fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A0=D0=B0=D1=81=D1=83=D0=BB?= Date: Thu, 15 Aug 2024 17:52:05 +0300 Subject: [PATCH] feat: increased node limit --- src/components/Universe/Graph/Cubes/Text/index.tsx | 2 +- src/stores/useDataStore/index.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/components/Universe/Graph/Cubes/Text/index.tsx b/src/components/Universe/Graph/Cubes/Text/index.tsx index e8e8cd660..a08db163e 100644 --- a/src/components/Universe/Graph/Cubes/Text/index.tsx +++ b/src/components/Universe/Graph/Cubes/Text/index.tsx @@ -102,7 +102,7 @@ export const TextNode = memo(({ node, hide }: Props) => { scale = Math.max(nodeScale, 20) - return scale + return Math.min(scale, 30) }, [node.edge_count, node.name, isSelected, isRelative, showSelectionGraph]) const fillOpacity = useMemo(() => { diff --git a/src/stores/useDataStore/index.ts b/src/stores/useDataStore/index.ts index 46fddd476..a62a96b7a 100644 --- a/src/stores/useDataStore/index.ts +++ b/src/stores/useDataStore/index.ts @@ -103,14 +103,14 @@ const defaultData: Omit< categoryFilter: null, dataInitial: null, currentPage: 0, - itemsPerPage: 25, + itemsPerPage: 1000, filters: { skip: '0', - limit: '25', + limit: '10000', depth: '2', - sort_by: 'date', + sort_by: 'date_added_to_graph', include_properties: 'true', - top_node_count: '10', + top_node_count: '50', includeContent: 'true', node_type: [], }, @@ -171,7 +171,7 @@ export const useDataStore = create()( ...withoutNodeType, ...ai, skip: currentPage === 0 ? String(currentPage * itemsPerPage) : String(currentPage * itemsPerPage + 1), - limit: String(itemsPerPage), + limit: word ? 25 : String(itemsPerPage), ...(filterNodeTypes.length > 0 ? { node_type: JSON.stringify(filterNodeTypes) } : {}), ...(word ? { word } : {}), ...(aiRefId && AISearchQuery ? { previous_search_ref_id: aiRefId } : {}),