fix(key): fix f2
This commit is contained in:
@@ -1175,20 +1175,13 @@ const PaperContainer = (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const getMinAreaBySizeThreshold = useCallback(
|
const getMinAreaBySizeThreshold = useCallback((sizeThreshold: number) => {
|
||||||
(sizeThreshold: number) => {
|
|
||||||
const normalizedSizeThreshold = Math.max(0, Number(sizeThreshold) || 0)
|
const normalizedSizeThreshold = Math.max(0, Number(sizeThreshold) || 0)
|
||||||
const currentScale =
|
// Threshold input is already expressed in the visible canvas coordinate
|
||||||
usePaperStore.getState().rasterScale[activeImage] ?? 1
|
// system, so the area threshold should be size^2 without reapplying
|
||||||
return (
|
// rasterScale.
|
||||||
normalizedSizeThreshold *
|
return normalizedSizeThreshold * normalizedSizeThreshold
|
||||||
normalizedSizeThreshold *
|
}, [])
|
||||||
currentScale *
|
|
||||||
currentScale
|
|
||||||
)
|
|
||||||
},
|
|
||||||
[activeImage]
|
|
||||||
)
|
|
||||||
|
|
||||||
function filterSupportPreviewBySizeThreshold(sizeThreshold: number) {
|
function filterSupportPreviewBySizeThreshold(sizeThreshold: number) {
|
||||||
const group = usePaperStore.getState().group
|
const group = usePaperStore.getState().group
|
||||||
|
|||||||
@@ -2231,7 +2231,7 @@ const TopTools = (
|
|||||||
</Flex>
|
</Flex>
|
||||||
</Tooltip>
|
</Tooltip>
|
||||||
<Tooltip
|
<Tooltip
|
||||||
label={`按尺寸阈值过滤辅助结果或选中 polygon(F2),实际面积阈值为 ${(Number(auxiliarySizeThresholdInput) || 0) ** 2}`}>
|
label={`按当前可见画布尺寸阈值过滤辅助结果或选中 polygon(F2),面积阈值 = size² = ${(Number(auxiliarySizeThresholdInput) || 0) ** 2}`}>
|
||||||
<Flex align="center" gap={4} wrap="nowrap">
|
<Flex align="center" gap={4} wrap="nowrap">
|
||||||
<Text span size="xs" style={{ minWidth: "fit-content" }}>
|
<Text span size="xs" style={{ minWidth: "fit-content" }}>
|
||||||
尺寸
|
尺寸
|
||||||
|
|||||||
Reference in New Issue
Block a user