summaryrefslogtreecommitdiff
path: root/components/Tweaks/FilterPanel.tsx
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-10-17 01:14:41 +0200
committerThomas F. K. Jorna <[email protected]>2021-10-17 01:14:41 +0200
commitd1f02171bd4727fb0c09657d6fe0f21f5cde9617 (patch)
treec1f4e920c0cfa2e9a2dfa1605d242e25cd28bfdd /components/Tweaks/FilterPanel.tsx
parent85b665b343d63096a3e62c210931040a44b07a1b (diff)
parentca2fa3dc8d405d0ec451f16b9fcc72cde6bbf470 (diff)
feat(algos): merge
Diffstat (limited to 'components/Tweaks/FilterPanel.tsx')
-rw-r--r--components/Tweaks/FilterPanel.tsx25
1 files changed, 23 insertions, 2 deletions
diff --git a/components/Tweaks/FilterPanel.tsx b/components/Tweaks/FilterPanel.tsx
index e375e31..ad0c5e4 100644
--- a/components/Tweaks/FilterPanel.tsx
+++ b/components/Tweaks/FilterPanel.tsx
@@ -20,8 +20,9 @@ import {
} from '@chakra-ui/react'
import React from 'react'
import { TagPanel } from './TagPanel'
-import { initialFilter, TagColors } from '../config'
+import { initialFilter, initialLocal, TagColors } from '../config'
import { TagColorPanel } from './TagColorPanel'
+import { SliderWithInfo } from './SliderWithInfo'
export interface FilterPanelProps {
filter: typeof initialFilter
@@ -31,10 +32,22 @@ export interface FilterPanelProps {
highlightColor: string
colorList: string[]
tags: string[]
+ local: typeof initialLocal
+ setLocal: any
}
const FilterPanel = (props: FilterPanelProps) => {
- const { filter, setFilter, tagColors, setTagColors, highlightColor, colorList, tags } = props
+ const {
+ filter,
+ setFilter,
+ local,
+ setLocal,
+ tagColors,
+ setTagColors,
+ highlightColor,
+ colorList,
+ tags,
+ } = props
return (
<Box>
<VStack
@@ -152,6 +165,14 @@ const FilterPanel = (props: FilterPanelProps) => {
isChecked={filter.bad}
></Switch>
</Flex>
+ <SliderWithInfo
+ label="Number of neighbors in local graph"
+ value={local.neighbors}
+ onChange={(v) => setLocal({ ...local, neighbors: v })}
+ min={1}
+ max={5}
+ step={1}
+ />
</VStack>
<Accordion padding={0} allowToggle allowMultiple paddingLeft={3}>
<AccordionItem>