diff --git a/src/component/helper/MapDraw.ts b/src/component/helper/MapDraw.ts index 159e1a07b7000eb7fba7cf1e074dfaed4df1baea..5388053207f27d780f90d828423305c3ea10fca8 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 e98de4946554867d58fda3767f99883f318f09b3..ce734dc068264f303bf374df9e8d4f9f62a84f5b 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;