From d5312df891f134a6a8f1ca9afe74d927a5889693 Mon Sep 17 00:00:00 2001 From: Boris Sekachev Date: Wed, 3 Mar 2021 13:45:17 +0300 Subject: [PATCH] Fixed: cannot close some issues (#2868) * Squashed commits * Merged develop * Aborted chanegs * Added ability to scroll issues * Aborted change * Updated version --- CHANGELOG.md | 1 + cvat-ui/package-lock.json | 2 +- cvat-ui/package.json | 2 +- .../annotation-page/review/hidden-issue-label.tsx | 15 ++++++++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14cfa6c6ae4b..7bb9bdc3e86c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated the path to python for DL models inside automatic annotation documentation () - Fixed of receiving function variable () - Shortcuts with CAPSLOCK enabled and with non-US languages activated () +- Prevented creating several issues for the same object () - Fixed label editor name field validator () - An error about track shapes outside of the task frames during export () diff --git a/cvat-ui/package-lock.json b/cvat-ui/package-lock.json index 0cd1ddc4cb36..a51ba06021b3 100644 --- a/cvat-ui/package-lock.json +++ b/cvat-ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.15.1", + "version": "1.15.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/cvat-ui/package.json b/cvat-ui/package.json index 5d8bf3b4b3ee..027fffe58974 100644 --- a/cvat-ui/package.json +++ b/cvat-ui/package.json @@ -1,6 +1,6 @@ { "name": "cvat-ui", - "version": "1.15.1", + "version": "1.15.2", "description": "CVAT single-page application", "main": "src/index.tsx", "scripts": { diff --git a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx index 579bec3129f0..1be37564d951 100644 --- a/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx +++ b/cvat-ui/src/components/annotation-page/review/hidden-issue-label.tsx @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MIT -import React, { ReactPortal, useEffect } from 'react'; +import React, { ReactPortal, useEffect, useRef } from 'react'; import ReactDOM from 'react-dom'; import Tag from 'antd/lib/tag'; import { CheckOutlined, CloseCircleOutlined } from '@ant-design/icons'; @@ -25,6 +25,8 @@ export default function HiddenIssueLabel(props: Props): ReactPortal { id, message, top, left, resolved, onClick, highlight, blur, } = props; + const ref = useRef(null); + useEffect(() => { if (!resolved) { setTimeout(highlight); @@ -37,10 +39,21 @@ export default function HiddenIssueLabel(props: Props): ReactPortal { return ReactDOM.createPortal( { + if (ref.current !== null) { + const selfElement = ref.current; + if (event.deltaX > 0) { + selfElement.parentElement?.appendChild(selfElement); + } else { + selfElement.parentElement?.prepend(selfElement); + } + } + }} style={{ top, left }} className='cvat-hidden-issue-label' >