Fixed: cannot close some issues (#2868)

* Squashed commits

* Merged develop

* Aborted chanegs

* Added ability to scroll issues

* Aborted change

* Updated version
main
Boris Sekachev 5 years ago committed by GitHub
parent 5e6a51acf4
commit d5312df891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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 (<https://github.com/openvinotoolkit/cvat/pull/2847>) - Updated the path to python for DL models inside automatic annotation documentation (<https://github.com/openvinotoolkit/cvat/pull/2847>)
- Fixed of receiving function variable (<https://github.com/openvinotoolkit/cvat/pull/2860>) - Fixed of receiving function variable (<https://github.com/openvinotoolkit/cvat/pull/2860>)
- Shortcuts with CAPSLOCK enabled and with non-US languages activated (<https://github.com/openvinotoolkit/cvat/pull/2872>) - Shortcuts with CAPSLOCK enabled and with non-US languages activated (<https://github.com/openvinotoolkit/cvat/pull/2872>)
- Prevented creating several issues for the same object (<https://github.com/openvinotoolkit/cvat/pull/2868>)
- Fixed label editor name field validator (<https://github.com/openvinotoolkit/cvat/pull/2879>) - Fixed label editor name field validator (<https://github.com/openvinotoolkit/cvat/pull/2879>)
- An error about track shapes outside of the task frames during export (<https://github.com/openvinotoolkit/cvat/pull/2890>) - An error about track shapes outside of the task frames during export (<https://github.com/openvinotoolkit/cvat/pull/2890>)

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.15.1", "version": "1.15.2",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "cvat-ui", "name": "cvat-ui",
"version": "1.15.1", "version": "1.15.2",
"description": "CVAT single-page application", "description": "CVAT single-page application",
"main": "src/index.tsx", "main": "src/index.tsx",
"scripts": { "scripts": {

@ -2,7 +2,7 @@
// //
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import React, { ReactPortal, useEffect } from 'react'; import React, { ReactPortal, useEffect, useRef } from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import Tag from 'antd/lib/tag'; import Tag from 'antd/lib/tag';
import { CheckOutlined, CloseCircleOutlined } from '@ant-design/icons'; 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, id, message, top, left, resolved, onClick, highlight, blur,
} = props; } = props;
const ref = useRef<HTMLElement>(null);
useEffect(() => { useEffect(() => {
if (!resolved) { if (!resolved) {
setTimeout(highlight); setTimeout(highlight);
@ -37,10 +39,21 @@ export default function HiddenIssueLabel(props: Props): ReactPortal {
return ReactDOM.createPortal( return ReactDOM.createPortal(
<CVATTooltip title={message}> <CVATTooltip title={message}>
<Tag <Tag
ref={ref}
id={elementID} id={elementID}
onClick={onClick} onClick={onClick}
onMouseEnter={highlight} onMouseEnter={highlight}
onMouseLeave={blur} onMouseLeave={blur}
onWheel={(event: React.WheelEvent) => {
if (ref.current !== null) {
const selfElement = ref.current;
if (event.deltaX > 0) {
selfElement.parentElement?.appendChild(selfElement);
} else {
selfElement.parentElement?.prepend(selfElement);
}
}
}}
style={{ top, left }} style={{ top, left }}
className='cvat-hidden-issue-label' className='cvat-hidden-issue-label'
> >

Loading…
Cancel
Save