From f12cb62dba4cd129cd207ff4c42bad9ed3a860ab Mon Sep 17 00:00:00 2001 From: pissang Date: Wed, 7 Apr 2021 12:17:42 +0800 Subject: [PATCH] fix(map): fix map label not display caused by merge --- src/component/helper/MapDraw.ts | 4 ++-- src/coord/geo/geoTypes.ts | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/component/helper/MapDraw.ts b/src/component/helper/MapDraw.ts index 159e1a07b..538805320 100644 --- a/src/component/helper/MapDraw.ts +++ b/src/component/helper/MapDraw.ts @@ -727,8 +727,8 @@ function resetLabelForRegion( const textEl = el.getTextContent(); if (textEl) { - textEl.x = labelXY ? labelXY[0] : 0; - textEl.y = labelXY ? labelXY[1] : 0; + mapLabelTransform(textEl).x = textEl.x = labelXY ? labelXY[0] : 0; + mapLabelTransform(textEl).y = textEl.y = labelXY ? labelXY[1] : 0; textEl.z2 = 10; textEl.afterUpdate = labelTextAfterUpdate; } diff --git a/src/coord/geo/geoTypes.ts b/src/coord/geo/geoTypes.ts index e98de4946..ce734dc06 100644 --- a/src/coord/geo/geoTypes.ts +++ b/src/coord/geo/geoTypes.ts @@ -19,9 +19,8 @@ import BoundingRect from 'zrender/src/core/BoundingRect'; import { HashMap } from 'zrender/src/core/util'; -import { Group, Path } from '../../util/graphic'; +import { Group } from '../../util/graphic'; import { Region } from './Region'; -import Element from 'zrender/src/Element'; export type GeoSVGSourceInput = 'string' | Document | SVGElement; -- GitLab