Skip to content

Commit

Permalink
Fixed: cannot close some issues (#2868)
Browse files Browse the repository at this point in the history
* Squashed commits

* Merged develop

* Aborted chanegs

* Added ability to scroll issues

* Aborted change

* Updated version
  • Loading branch information
Boris Sekachev authored Mar 3, 2021
1 parent 5e6a51a commit d5312df
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>)
- 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>)
- 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>)
- An error about track shapes outside of the task frames during export (<https://github.com/openvinotoolkit/cvat/pull/2890>)

Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cvat-ui/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -25,6 +25,8 @@ export default function HiddenIssueLabel(props: Props): ReactPortal {
id, message, top, left, resolved, onClick, highlight, blur,
} = props;

const ref = useRef<HTMLElement>(null);

useEffect(() => {
if (!resolved) {
setTimeout(highlight);
Expand All @@ -37,10 +39,21 @@ export default function HiddenIssueLabel(props: Props): ReactPortal {
return ReactDOM.createPortal(
<CVATTooltip title={message}>
<Tag
ref={ref}
id={elementID}
onClick={onClick}
onMouseEnter={highlight}
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 }}
className='cvat-hidden-issue-label'
>
Expand Down

0 comments on commit d5312df

Please sign in to comment.