diff --git a/ui/src/shared/components/threesizer/Division.tsx b/ui/src/shared/components/threesizer/Division.tsx index ad0a41f251..fc83c0b2b0 100644 --- a/ui/src/shared/components/threesizer/Division.tsx +++ b/ui/src/shared/components/threesizer/Division.tsx @@ -8,7 +8,11 @@ import classnames from 'classnames' import calculateSize from 'calculate-size' import DivisionHeader from 'src/shared/components/threesizer/DivisionHeader' -import {HANDLE_VERTICAL, HANDLE_HORIZONTAL} from 'src/shared/constants/index' +import { + HANDLE_VERTICAL, + HANDLE_HORIZONTAL, + MIN_HANDLE_PIXELS, +} from 'src/shared/constants/index' import {MenuItem} from 'src/shared/components/threesizer/DivisionMenu' const NOOP = () => {} @@ -156,7 +160,10 @@ class Division extends PureComponent { return } - if (orientation === HANDLE_HORIZONTAL && handlePixels >= 20) { + if ( + orientation === HANDLE_HORIZONTAL && + handlePixels >= MIN_HANDLE_PIXELS + ) { return ( { ) } - if (handlePixels >= 20) { + if (handlePixels >= MIN_HANDLE_PIXELS) { return
{name}
} } diff --git a/ui/src/shared/constants/index.tsx b/ui/src/shared/constants/index.tsx index 99566c1ba4..647848f3ba 100644 --- a/ui/src/shared/constants/index.tsx +++ b/ui/src/shared/constants/index.tsx @@ -481,6 +481,7 @@ export const HANDLE_VERTICAL = 'vertical' export const HANDLE_HORIZONTAL = 'horizontal' export const HANDLE_NONE = 'none' export const HANDLE_PIXELS = 20 +export const MIN_HANDLE_PIXELS = 20 export const MAX_SIZE = 1 export const MIN_SIZE = 0