From 94f58a505b3f344286e81bac655a2ea4e4ad859a Mon Sep 17 00:00:00 2001 From: Dmitry Kalinin Date: Tue, 28 Jul 2020 16:21:47 +0300 Subject: [PATCH] CVAT UI: batch of fixes (#1952) --- .stylelintrc.json | 8 ++++++-- CHANGELOG.md | 3 ++- cvat-canvas/src/typescript/canvasView.ts | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/.stylelintrc.json b/.stylelintrc.json index 528bc3730f0..4a37e44d96c 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -11,6 +11,10 @@ "selector-type-no-unknown": [true, { "ignoreTypes": ["first-child"] }] - } - + }, + "ignoreFiles": [ + "**/*.js", + "**/*.ts", + "**/*.py" + ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index a2ae5ce773d..231738bc914 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,7 +33,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Points are dublicated during polygon interpolation sometimes () - When redraw a shape with activated autobordering, previous points are visible () - No mapping between side object element and context menu in some attributes () -- Interpolated shapes exported as `keyframe = True` (https://github.com/opencv/cvat/pull/1937) +- Interpolated shapes exported as `keyframe = True` () +- Stylelint filetype scans () ### Security - diff --git a/cvat-canvas/src/typescript/canvasView.ts b/cvat-canvas/src/typescript/canvasView.ts index 7194b0da767..4eb95a8fc3e 100644 --- a/cvat-canvas/src/typescript/canvasView.ts +++ b/cvat-canvas/src/typescript/canvasView.ts @@ -189,7 +189,7 @@ export class CanvasViewImpl implements CanvasView, Listener { } private onEditDone(state: any, points: number[]): void { - if (state && points) { + if (state && points) { const event: CustomEvent = new CustomEvent('canvas.edited', { bubbles: false, cancelable: true, @@ -1732,7 +1732,12 @@ export class CanvasViewImpl implements CanvasView, Listener { private addText(state: any): SVG.Text { const { undefinedAttrValue } = this.configuration; - const { label, clientID, attributes, source } = state; + const { + label, + clientID, + attributes, + source, + } = state; const attrNames = label.attributes.reduce((acc: any, val: any): void => { acc[val.id] = val.name; return acc;