Skip to content

Commit

Permalink
Merge branch 'zm/z-order-fix' of https://github.com/opencv/cvat into …
Browse files Browse the repository at this point in the history
…zm/z-order-fix
  • Loading branch information
zhiltsov-max committed May 22, 2020
2 parents 9c1dbc4 + 3dd8314 commit bae042f
Show file tree
Hide file tree
Showing 25 changed files with 190 additions and 164 deletions.
17 changes: 12 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `datumaro_project` export format (https://github.com/opencv/cvat/pull/1352)
- Ability to configure user agreements for the user registration form (https://github.com/opencv/cvat/pull/1464)
- Added cuboid interpolation and cuboid drawing from rectangles (<https://github.com/opencv/cvat/pull/1560>)
- Ability to configure custom pageViewHit, which can be useful for web analytics integration (https://github.com/opencv/cvat/pull/1566)

### Changed
- Downloaded file name in annotations export became more informative (https://github.com/opencv/cvat/pull/1352)
Expand All @@ -29,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed
- `annotation` application is replaced with `dataset_manager` (https://github.com/opencv/cvat/pull/1352)
- `_DATUMARO_INIT_LOGLEVEL` env. variable is removed in favor of regular `--loglevel` cli parameter (https://github.com/opencv/cvat/pull/1583)

### Fixed
- Categories for empty projects with no sources are taken from own dataset (https://github.com/opencv/cvat/pull/1352)
Expand All @@ -43,11 +45,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Task/Job buttons has no "Open in new tab" option (<https://github.com/opencv/cvat/pull/1419>)
- Delete point context menu option has no shortcut hint (<https://github.com/opencv/cvat/pull/1416>)
- Fixed issue with unnecessary tag activation in cvat-canvas (<https://github.com/opencv/cvat/issues/1540>)
- Fixed an issue with large number of instances in instance mask (https://github.com/opencv/cvat/issues/1539)
- Fixed full COCO dataset import error with conflicting labels in keypoints and detection (https://github.com/opencv/cvat/pull/1548)
- Fixed COCO keypoints skeleton parsing and saving (https://github.com/opencv/cvat/issues/1539)
- `tf.placeholder() is not compatible with eager execution` exception for auto_segmentation (https://github.com/opencv/cvat/pull/1562)
- Fixed an issue with `z_order` having no effect on segmentations (https://github.com/opencv/cvat/pull/1589/)
- Fixed an issue with large number of instances in instance mask (<https://github.com/opencv/cvat/issues/1539>)
- Fixed full COCO dataset import error with conflicting labels in keypoints and detection (<https://github.com/opencv/cvat/pull/1548>)
- Fixed COCO keypoints skeleton parsing and saving (<https://github.com/opencv/cvat/issues/1539>)
- `tf.placeholder() is not compatible with eager execution` exception for auto_segmentation (<https://github.com/opencv/cvat/pull/1562>)
- Canvas cannot be moved with move functionality on left mouse key (<https://github.com/opencv/cvat/pull/1573>)
- Deep extreme cut request is sent when draw any shape with Make AI polygon option enabled (<https://github.com/opencv/cvat/pull/1573>)
- Fixed an error when exporting a task with cuboids to any format except CVAT (<https://github.com/opencv/cvat/pull/1577>)
- Synchronization with remote git repo (<https://github.com/opencv/cvat/pull/1582>)
- A problem with mask to polygons conversion when polygons are too small (<https://github.com/opencv/cvat/pull/1581>)
- Fixed an issue with `z_order` having no effect on segmentations (<https://github.com/opencv/cvat/pull/1589>)

### Security
-
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG https_proxy
ARG no_proxy
ARG socks_proxy
ARG PUBLIC_INSTANCE
ARG WA_PAGE_VIEW_HIT

ENV TERM=xterm \
http_proxy=${http_proxy} \
Expand Down
2 changes: 1 addition & 1 deletion cvat-canvas/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-canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cvat-canvas",
"version": "1.1.0",
"version": "1.1.1",
"description": "Part of Computer Vision Annotation Tool which presents its canvas library",
"main": "src/canvas.ts",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions cvat-canvas/src/typescript/canvasView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ export class CanvasViewImpl implements CanvasView, Listener {
self.onEditDone(
state,
points,
)
);
e.preventDefault();
return;
}
Expand Down Expand Up @@ -687,7 +687,7 @@ export class CanvasViewImpl implements CanvasView, Listener {

this.content.addEventListener('mousedown', (event): void => {
if ([0, 1].includes(event.button)) {
if ([Mode.IDLE, Mode.DRAG, Mode.MERGE, Mode.SPLIT].includes(this.mode)
if ([Mode.IDLE, Mode.DRAG_CANVAS, Mode.MERGE, Mode.SPLIT].includes(this.mode)
|| event.button === 1 || event.altKey
) {
self.controller.enableDrag(event.clientX, event.clientY);
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.1.4",
"version": "1.2.0",
"description": "CVAT single-page application",
"main": "src/index.tsx",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ function DrawShapePopoverComponent(props: Props): JSX.Element {
onChangeCuboidDrawingMethod,
} = props;

const trackDisabled = shapeType === ShapeType.POLYGON || shapeType === ShapeType.POLYLINE
const trackDisabled = shapeType === ShapeType.POLYGON
|| shapeType === ShapeType.POLYLINE
|| (shapeType === ShapeType.POINTS && numberOfPoints !== 1);

return (
Expand Down Expand Up @@ -85,9 +86,7 @@ function DrawShapePopoverComponent(props: Props): JSX.Element {
</Select>
</Col>
</Row>
{
shapeType === ShapeType.POLYGON && <DEXTRPlugin />
}
{ shapeType === ShapeType.POLYGON && <DEXTRPlugin /> }
{
shapeType === ShapeType.RECTANGLE && (
<>
Expand Down Expand Up @@ -183,19 +182,14 @@ function DrawShapePopoverComponent(props: Props): JSX.Element {
<Row type='flex' justify='space-around'>
<Col span={12}>
<Tooltip title={`Press ${repeatShapeShortcut} to draw again`}>
<Button
onClick={onDrawShape}
>
<Button onClick={onDrawShape}>
Shape
</Button>
</Tooltip>
</Col>
<Col span={12}>
<Tooltip title={`Press ${repeatShapeShortcut} to draw again`}>
<Button
onClick={onDrawTrack}
disabled={trackDisabled}
>
<Button onClick={onDrawTrack} disabled={trackDisabled}>
Track
</Button>
</Tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import TextArea from 'antd/lib/input/TextArea';

import CreateTaskContent, { CreateTaskData } from './create-task-content';


interface Props {
onCreate: (data: CreateTaskData) => void;
status: string;
Expand Down
3 changes: 2 additions & 1 deletion cvat-ui/src/components/create-task-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
text-align: center;
padding-top: 40px;
overflow-y: auto;
height: 90%;
height: 100%;
padding-bottom: 40px;

> div > span {
font-size: 36px;
Expand Down
8 changes: 7 additions & 1 deletion cvat-ui/src/components/cvat-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import AnnotationPageContainer from 'containers/annotation-page/annotation-page'
import LoginPageContainer from 'containers/login-page/login-page';
import RegisterPageContainer from 'containers/register-page/register-page';
import HeaderContainer from 'containers/header/header';
import { customWaViewHit } from 'utils/enviroment';

import getCore from 'cvat-core-wrapper';
import { NotificationsState } from 'reducers/interfaces';
Expand Down Expand Up @@ -61,7 +62,7 @@ interface CVATAppProps {
class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentProps> {
public componentDidMount(): void {
const core = getCore();
const { verifyAuthorized, loadUserAgreements } = this.props;
const { verifyAuthorized, history } = this.props;
configure({ ignoreRepeatedEventsWhenKeyHeldDown: false });

// Logger configuration
Expand All @@ -71,6 +72,11 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP
});
core.logger.configure(() => window.document.hasFocus, userActivityCallback);

customWaViewHit(location.pathname, location.search, location.hash);
history.listen((location) => {
customWaViewHit(location.pathname, location.search, location.hash);
});

verifyAuthorized();
}

Expand Down
15 changes: 11 additions & 4 deletions cvat-ui/src/components/register-page/register-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Checkbox from 'antd/lib/checkbox';
import patterns from 'utils/validation-patterns';

import { UserAgreement } from 'reducers/interfaces'
import { Row, Col } from 'antd/lib/grid';

export interface UserConfirmation {
name: string;
Expand Down Expand Up @@ -107,9 +108,9 @@ class RegisterFormComponent extends React.PureComponent<RegisterFormProps> {
form.validateFields((error, values): void => {
if (!error) {
values.confirmations = []

for (const userAgreement of userAgreements) {

values.confirmations.push({
name: userAgreement.name,
value: values[userAgreement.name]
Expand Down Expand Up @@ -289,8 +290,14 @@ class RegisterFormComponent extends React.PureComponent<RegisterFormProps> {

return (
<Form onSubmit={this.handleSubmit} className='login-form'>
{this.renderFirstNameField()}
{this.renderLastNameField()}
<Row gutter={8}>
<Col span={12}>
{this.renderFirstNameField()}
</Col>
<Col span={12}>
{this.renderLastNameField()}
</Col>
</Row>
{this.renderUsernameField()}
{this.renderEmailField()}
{this.renderPasswordField()}
Expand Down
7 changes: 4 additions & 3 deletions cvat-ui/src/components/register-page/register-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
//
// SPDX-License-Identifier: MIT

import './styles.scss';
import React from 'react';
import { RouteComponentProps } from 'react-router';
import { Link, withRouter } from 'react-router-dom';
Expand All @@ -10,8 +11,8 @@ import Text from 'antd/lib/typography/Text';
import { Row, Col } from 'antd/lib/grid';

import { UserAgreement } from 'reducers/interfaces'
import RegisterForm, { RegisterData, UserConfirmation } from './register-form';
import CookieDrawer from 'components/login-page/cookie-policy-drawer';
import RegisterForm, { RegisterData, UserConfirmation } from './register-form';

interface RegisterPageComponentProps {
fetching: boolean;
Expand All @@ -29,8 +30,8 @@ function RegisterPageComponent(
xs: { span: 14 },
sm: { span: 14 },
md: { span: 10 },
lg: { span: 4 },
xl: { span: 4 },
lg: { span: 6 },
xl: { span: 5 },
};

const {
Expand Down
7 changes: 7 additions & 0 deletions cvat-ui/src/components/register-page/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT

.ant-form-item {
margin-bottom: 12px;
}
3 changes: 2 additions & 1 deletion cvat-ui/src/components/settings-page/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
@import '../../base.scss';

.cvat-settings-page {
height: 90%;
height: 100%;
overflow-y: auto;
padding-bottom: 15px;

> div:nth-child(1) {
margin-top: 30px;
Expand Down
1 change: 1 addition & 0 deletions cvat-ui/src/components/tasks-page/top-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ function TopBarComponent(props: VisibleTopBarProps & RouteComponentProps): JSX.E
onClick={
(): void => history.push('/tasks/create')
}
icon='plus'
>
Create new task
</Button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,7 @@ class DrawShapePopoverContainer extends React.PureComponent<Props, State> {
}

private onDraw(objectType: ObjectType): void {
const {
canvasInstance,
shapeType,
onDrawStart,
} = this.props;
const { canvasInstance, shapeType, onDrawStart } = this.props;

const {
rectDrawingMethod,
Expand Down Expand Up @@ -143,8 +139,8 @@ class DrawShapePopoverContainer extends React.PureComponent<Props, State> {
private onChangeCuboidDrawingMethod = (event: RadioChangeEvent): void => {
this.setState({
cuboidDrawingMethod: event.target.value,
})
}
});
};

private onDrawShape = (): void => {
this.onDraw(ObjectType.SHAPE);
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/cvat-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
Reducer,
} from 'redux';
import { createLogger } from 'redux-logger';
import {isDev} from 'utils/enviroment';
import { isDev } from 'utils/enviroment';


const logger = createLogger({
Expand Down
Loading

0 comments on commit bae042f

Please sign in to comment.