fix(key): fix f2

This commit is contained in:
zhangheng
2026-04-20 14:59:51 +08:00
parent 4a3930abac
commit 67dcf85763
2 changed files with 8 additions and 15 deletions

View File

@@ -1175,20 +1175,13 @@ const PaperContainer = (
}
}
const getMinAreaBySizeThreshold = useCallback(
(sizeThreshold: number) => {
const normalizedSizeThreshold = Math.max(0, Number(sizeThreshold) || 0)
const currentScale =
usePaperStore.getState().rasterScale[activeImage] ?? 1
return (
normalizedSizeThreshold *
normalizedSizeThreshold *
currentScale *
currentScale
)
},
[activeImage]
)
const getMinAreaBySizeThreshold = useCallback((sizeThreshold: number) => {
const normalizedSizeThreshold = Math.max(0, Number(sizeThreshold) || 0)
// Threshold input is already expressed in the visible canvas coordinate
// system, so the area threshold should be size^2 without reapplying
// rasterScale.
return normalizedSizeThreshold * normalizedSizeThreshold
}, [])
function filterSupportPreviewBySizeThreshold(sizeThreshold: number) {
const group = usePaperStore.getState().group

View File

@@ -2231,7 +2231,7 @@ const TopTools = (
</Flex>
</Tooltip>
<Tooltip
label={`按尺寸阈值过滤辅助结果或选中 polygonF2实际面积阈值 ${(Number(auxiliarySizeThresholdInput) || 0) ** 2}`}>
label={`当前可见画布尺寸阈值过滤辅助结果或选中 polygonF2面积阈值 = size² = ${(Number(auxiliarySizeThresholdInput) || 0) ** 2}`}>
<Flex align="center" gap={4} wrap="nowrap">
<Text span size="xs" style={{ minWidth: "fit-content" }}>