fix(key): fix f2
This commit is contained in:
@@ -1175,20 +1175,13 @@ const PaperContainer = (
|
||||
}
|
||||
}
|
||||
|
||||
const getMinAreaBySizeThreshold = useCallback(
|
||||
(sizeThreshold: number) => {
|
||||
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]
|
||||
)
|
||||
// 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
|
||||
|
||||
@@ -2231,7 +2231,7 @@ const TopTools = (
|
||||
</Flex>
|
||||
</Tooltip>
|
||||
<Tooltip
|
||||
label={`按尺寸阈值过滤辅助结果或选中 polygon(F2),实际面积阈值为 ${(Number(auxiliarySizeThresholdInput) || 0) ** 2}`}>
|
||||
label={`按当前可见画布尺寸阈值过滤辅助结果或选中 polygon(F2),面积阈值 = size² = ${(Number(auxiliarySizeThresholdInput) || 0) ** 2}`}>
|
||||
<Flex align="center" gap={4} wrap="nowrap">
|
||||
<Text span size="xs" style={{ minWidth: "fit-content" }}>
|
||||
尺寸
|
||||
|
||||
Reference in New Issue
Block a user