Skip to content

Commit fd87c34

Browse files
committed
fix(map): remove preventAutoZ for map
1 parent 4d990f7 commit fd87c34

3 files changed

Lines changed: 6 additions & 10 deletions

File tree

src/chart/map/MapSeries.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ export interface MapDataItemOption extends MapStateOption,
5555
StatesOptionMixin<MapStateOption, StatesMixinBase>,
5656
OptionDataItemObject<OptionDataValueNumeric> {
5757
cursor?: string
58-
z?: number
5958
silent?: boolean
6059
}
6160

src/component/helper/MapDraw.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@ class MapDraw {
302302
? mapOrGeoModel.getRegionModel(regionName)
303303
: (data ? data.getItemModel(dataIdx) as Model<MapDataItemOption> : null);
304304

305+
const silent = (regionModel as Model<RegionOption>).get('silent', true);
306+
silent != null && (regionGroup.silent = silent);
307+
305308
regionsInfoByName.set(regionName, { dataIdx, regionModel });
306309
}
307310

@@ -352,12 +355,6 @@ class MapDraw {
352355
viewBuildCtx, compoundPath, regionName, regionModel, mapOrGeoModel, dataIdx, centerPt
353356
);
354357

355-
const z = (regionModel as Model<RegionOption>).get('z', true);
356-
z != null && (compoundPath.attr('z', z));
357-
358-
const silent = (regionModel as Model<RegionOption>).get('silent', true);
359-
silent != null && (compoundPath.silent = silent);
360-
361358
if (isLine) {
362359
fixLineStyle(compoundPath);
363360
zrUtil.each(compoundPath.states, fixLineStyle);
@@ -427,6 +424,9 @@ class MapDraw {
427424
el.culling = true;
428425
}
429426

427+
const silent = (regionModel as Model<RegionOption>).get('silent', true);
428+
silent != null && (el.silent = silent);
429+
430430
// We do not know how the SVG like so we'd better not to change z2.
431431
// Otherwise it might bring some unexpected result. For example,
432432
// an area hovered that make some inner city can not be clicked.

src/coord/geo/GeoModel.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ export interface RegionOption extends GeoStateOption, StatesOptionMixin<GeoState
6363
name?: string
6464
selected?: boolean
6565
tooltip?: CommonTooltipOption<GeoTooltipFormatterParams>
66-
z?: number
6766
silent?: boolean
6867
}
6968

@@ -140,8 +139,6 @@ class GeoModel extends ComponentModel<GeoOption> {
140139
static type = 'geo';
141140
readonly type = GeoModel.type;
142141

143-
preventAutoZ = true;
144-
145142
coordinateSystem: Geo;
146143

147144
static layoutMode = 'box' as const;

0 commit comments

Comments
 (0)