Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIDEA-193: Globe: Color disputed lands according to neighboring countries' color #91

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions components/Globe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,12 @@ const disputedLands: Record<string, {
disputers: string[]
mapSeries: am5map.MapPolygonSeries | null
displayed: boolean
colorAsSelectable: boolean
}> = {
"Western Sahara": { disputers: ["ESH", "MAR"], mapSeries: null, displayed: false },
"Abyei": { disputers: ["SSD", "SDN"], mapSeries: null, displayed: false },
"Aksai Chin": { disputers: ["CHN", "IND"], mapSeries: null, displayed: false },
"Jammu and Kashmir": { disputers: ["IND", "PAK", "CHN"], mapSeries: null, displayed: false },
"Western Sahara": { disputers: ["ESH", "MAR"], mapSeries: null, displayed: false, colorAsSelectable: false },
"Abyei": { disputers: ["SSD", "SDN"], mapSeries: null, displayed: false, colorAsSelectable: false },
"Aksai Chin": { disputers: ["CHN", "IND"], mapSeries: null, displayed: false, colorAsSelectable: true },
"Jammu and Kashmir": { disputers: ["IND", "PAK", "CHN"], mapSeries: null, displayed: false, colorAsSelectable: true },
};
const chartDefaultSettings: am5map.IMapChartSettings = {
panX: "rotateX",
Expand Down Expand Up @@ -112,7 +113,6 @@ const disputedAreaSeriesSettings: am5map.IMapPolygonSeriesSettings = {
// Settings for disputed *land* areas - see 'Customization' in shapefiles.md
const disputedLandSeriesSettings: am5map.IMapPolygonSeriesSettings = {
...disputedAreaSeriesSettings,
fill: defaultLandColour,
layer: maxZindex - 1, // Make sure disputed areas are always painted on top of country areas
};
// Settings for disputed *water* areas - see 'Customization' in shapefiles.md
Expand Down Expand Up @@ -339,6 +339,7 @@ const setUpDisputedAreasSeries = () => {
...disputedLandSeriesSettings,
reverseGeodata: true,
include: [disputedArea],
fill: disputedLands[disputedArea].colorAsSelectable ? defaultLandColour : unselectableLandColor,
});
});

Expand Down