From a499550f30fb076c81b6ac4a45a4915c3841cd65 Mon Sep 17 00:00:00 2001 From: skie1997 Date: Tue, 28 May 2024 14:41:20 +0800 Subject: [PATCH] chore: reconfig delta value to constant --- packages/vrender-components/src/marker/config.ts | 1 + packages/vrender-components/src/marker/line.ts | 6 +++--- packages/vrender-components/src/marker/point.ts | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/vrender-components/src/marker/config.ts b/packages/vrender-components/src/marker/config.ts index cc6dd8252..73a6df366 100644 --- a/packages/vrender-components/src/marker/config.ts +++ b/packages/vrender-components/src/marker/config.ts @@ -1,6 +1,7 @@ import type { TextAlignType, TextBaselineType } from '@visactor/vrender-core'; import { IMarkAreaLabelPosition, IMarkLineLabelPosition, IMarkCommonArcLabelPosition } from './type'; +export const FUZZY_EQUAL_DELTA = 0.001; export const DEFAULT_MARK_LINE_THEME = { interactive: true, startSymbol: { diff --git a/packages/vrender-components/src/marker/line.ts b/packages/vrender-components/src/marker/line.ts index e0e436971..ba3b9d78e 100644 --- a/packages/vrender-components/src/marker/line.ts +++ b/packages/vrender-components/src/marker/line.ts @@ -10,7 +10,7 @@ import type { ArcSegment } from '../segment'; // eslint-disable-next-line no-duplicate-imports import { Segment } from '../segment'; import { DEFAULT_STATES } from '../constant'; -import { DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP, DEFAULT_MARK_LINE_THEME } from './config'; +import { DEFAULT_CARTESIAN_MARK_LINE_TEXT_STYLE_MAP, DEFAULT_MARK_LINE_THEME, FUZZY_EQUAL_DELTA } from './config'; import type { ILineGraphicAttribute } from '@visactor/vrender-core'; import { markCommonLineAnimate } from './animate/animate'; import { fuzzyEqualNumber, getTextAlignAttrOfVerticalDir, isPostiveXAxis } from '../util'; @@ -82,8 +82,8 @@ export class MarkLine extends MarkCommonLine { name = 'markPoint'; static defaultAttributes = DEFAULT_MARK_POINT_THEME;