Skip to content

Commit

Permalink
fix: 修复 Sense-annotation 编译错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
laoluo committed Sep 26, 2021
1 parent e28c124 commit 8c16888
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import ZoomUtils from '../../utils/tool/ZoomUtils';
import EventListener from './eventListener';
import locale from '../../locales';
import { EMessage } from '../../locales/constants';
import { CommonToolUtils } from '@/';
import CommonToolUtils from '@/utils/tool/CommonToolUtils';
import MathUtils from '@/utils/MathUtils';
import { styleDefaultConfig } from '@/constant/defaultConfig';
import AxisUtils from '@/utils/tool/AxisUtils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { CommonToolUtils, TagUtils } from '@/';
import CommonToolUtils from '@/utils/tool/CommonToolUtils';
import TagUtils from '@/utils/tool/TagUtils';
import { cloneDeep } from 'lodash';
import { DEFAULT_TEXT_OFFSET } from '../../constant/annotation';
import { EToolName } from '../../constant/tool';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AxisUtils, RectUtils } from '@/';
import AxisUtils from '@/utils/tool/AxisUtils';
import RectUtils from '@/utils/tool/RectUtils';
import MathUtils from '@/utils/MathUtils';
import { DEFAULT_TEXT_SHADOW, EDragStatus, ESortDirection } from '../../constant/annotation';
import EKeyCode from '../../constant/keyCode';
Expand Down
12 changes: 7 additions & 5 deletions packages/lb-annotation/src/core/toolOperation/tagOperation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import TagUtils from '../../utils/tool/TagUtils';
import uuid from '../../utils/uuid';
import { BasicToolOperation, IBasicToolOperationProps } from './basicToolOperation';
import { CommonToolUtils } from '@/';
import CommonToolUtils from '@/utils/tool/CommonToolUtils';

interface ITagOperationProps extends IBasicToolOperationProps {
config: string;
Expand Down Expand Up @@ -41,10 +41,12 @@ class TagOperation extends BasicToolOperation {
* 当前页面的标注结果
*/
public get currentTagResult() {
return this.tagResult.filter((v) => {
const basicSourceID = `${v.sourceID}`;
return basicSourceID === this.sourceID;
})[0] || {};
return (
this.tagResult.filter((v) => {
const basicSourceID = `${v.sourceID}`;
return basicSourceID === this.sourceID;
})[0] || {}
);
}

public onKeyDown(e: KeyboardEvent) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AxisUtils } from '@/';
import AxisUtils from '@/utils/tool/AxisUtils';

class DblClickEventListener {
private dom: HTMLElement; // 点击时间绑定的对象
Expand Down
3 changes: 2 additions & 1 deletion packages/lb-annotation/src/utils/tool/RectUtils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { AxisUtils, CommonToolUtils } from '@/';
import AxisUtils from '@/utils/tool/AxisUtils';
import CommonToolUtils from '@/utils/tool/CommonToolUtils';
import { IPolygonPoint } from '../../types/tool/polygon';
import { isInPolygon } from './polygonTool';

Expand Down
3 changes: 2 additions & 1 deletion packages/lb-annotation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
Expand All @@ -10,6 +10,7 @@
"noImplicitThis": false,
"declaration": true,
"declarationDir": "dist/types",
"skipLibCheck": true,
"esModuleInterop": true,
"paths": {
"@/*": ["src/*"]
Expand Down

0 comments on commit 8c16888

Please sign in to comment.