From 10c300605f6ef8fc3c786a4bb4bd5423aebbc479 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 1 Apr 2020 00:30:29 +0300 Subject: [PATCH] No break space const --- .../attribute-annotation-sidebar/attribute-editor.tsx | 6 ++++-- .../standard-workspace/objects-side-bar/object-item.tsx | 6 ++++-- cvat-ui/src/consts.ts | 2 ++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx index 50cec85a..6917e42f 100644 --- a/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx +++ b/cvat-ui/src/components/annotation-page/attribute-annotation-workspace/attribute-annotation-sidebar/attribute-editor.tsx @@ -56,7 +56,8 @@ function renderInputElement(parameters: InputElementParameters): JSX.Element { > {values.map((value: string): JSX.Element => ( - {value === consts.UNDEFINED_ATTRIBUTE_VALUE ? '\u00a0' : value} + {value === consts.UNDEFINED_ATTRIBUTE_VALUE + ? consts.NO_BREAK_SPACE : value} ))} @@ -76,7 +77,8 @@ function renderInputElement(parameters: InputElementParameters): JSX.Element { > {values.map((value: string): JSX.Element => ( - {value === consts.UNDEFINED_ATTRIBUTE_VALUE ? '\u00a0' : value} + {value === consts.UNDEFINED_ATTRIBUTE_VALUE + ? consts.NO_BREAK_SPACE : value} ))} diff --git a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx index efd81d67..2a43e042 100644 --- a/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx +++ b/cvat-ui/src/components/annotation-page/standard-workspace/objects-side-bar/object-item.tsx @@ -509,7 +509,8 @@ function ItemAttributeComponent(props: ItemAttributeComponentProps): JSX.Element > { attrValues.map((value: string): JSX.Element => ( - {value === consts.UNDEFINED_ATTRIBUTE_VALUE ? '\u00a0' : value} + {value === consts.UNDEFINED_ATTRIBUTE_VALUE + ? consts.NO_BREAK_SPACE : value} )) } @@ -537,7 +538,8 @@ function ItemAttributeComponent(props: ItemAttributeComponentProps): JSX.Element > { attrValues.map((value: string): JSX.Element => ( - {value === consts.UNDEFINED_ATTRIBUTE_VALUE ? '\u00a0' : value} + {value === consts.UNDEFINED_ATTRIBUTE_VALUE + ? consts.NO_BREAK_SPACE : value} )) } diff --git a/cvat-ui/src/consts.ts b/cvat-ui/src/consts.ts index 666dc98d..aceacc0f 100644 --- a/cvat-ui/src/consts.ts +++ b/cvat-ui/src/consts.ts @@ -3,7 +3,9 @@ // SPDX-License-Identifier: MIT const UNDEFINED_ATTRIBUTE_VALUE = '__undefined__'; +const NO_BREAK_SPACE = '\u00a0'; export default { UNDEFINED_ATTRIBUTE_VALUE, + NO_BREAK_SPACE, };