Skip to content

Commit

Permalink
fix(map): remove preventAutoZ for map
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovilia committed Dec 9, 2024
1 parent 4d990f7 commit fd87c34
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/chart/map/MapSeries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export interface MapDataItemOption extends MapStateOption,
StatesOptionMixin<MapStateOption, StatesMixinBase>,
OptionDataItemObject<OptionDataValueNumeric> {
cursor?: string
z?: number
silent?: boolean
}

Expand Down
12 changes: 6 additions & 6 deletions src/component/helper/MapDraw.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,9 @@ class MapDraw {
? mapOrGeoModel.getRegionModel(regionName)
: (data ? data.getItemModel(dataIdx) as Model<MapDataItemOption> : null);

const silent = (regionModel as Model<RegionOption>).get('silent', true);
silent != null && (regionGroup.silent = silent);

regionsInfoByName.set(regionName, { dataIdx, regionModel });
}

Expand Down Expand Up @@ -352,12 +355,6 @@ class MapDraw {
viewBuildCtx, compoundPath, regionName, regionModel, mapOrGeoModel, dataIdx, centerPt
);

const z = (regionModel as Model<RegionOption>).get('z', true);
z != null && (compoundPath.attr('z', z));

const silent = (regionModel as Model<RegionOption>).get('silent', true);
silent != null && (compoundPath.silent = silent);

if (isLine) {
fixLineStyle(compoundPath);
zrUtil.each(compoundPath.states, fixLineStyle);
Expand Down Expand Up @@ -427,6 +424,9 @@ class MapDraw {
el.culling = true;
}

const silent = (regionModel as Model<RegionOption>).get('silent', true);
silent != null && (el.silent = silent);

// We do not know how the SVG like so we'd better not to change z2.
// Otherwise it might bring some unexpected result. For example,
// an area hovered that make some inner city can not be clicked.
Expand Down
3 changes: 0 additions & 3 deletions src/coord/geo/GeoModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ export interface RegionOption extends GeoStateOption, StatesOptionMixin<GeoState
name?: string
selected?: boolean
tooltip?: CommonTooltipOption<GeoTooltipFormatterParams>
z?: number
silent?: boolean
}

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

preventAutoZ = true;

coordinateSystem: Geo;

static layoutMode = 'box' as const;
Expand Down

0 comments on commit fd87c34

Please sign in to comment.