From 429a81311a8300f9a65424a8c6e431bd17aafc9a Mon Sep 17 00:00:00 2001 From: David Mears Date: Mon, 11 Nov 2024 13:51:22 +0000 Subject: [PATCH] Globe: Color disputed lands according to neighboring countries' color The intention is to prevent the Abyei region (between Sudan and South Sudan) from looking like a selectable country, which it did because it was colored with the default color but was surrounded by unselectable countries. --- components/Globe.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/components/Globe.vue b/components/Globe.vue index f4c00b70..524a77d8 100644 --- a/components/Globe.vue +++ b/components/Globe.vue @@ -63,11 +63,12 @@ const disputedLands: Record = { - "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", @@ -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 @@ -339,6 +339,7 @@ const setUpDisputedAreasSeries = () => { ...disputedLandSeriesSettings, reverseGeodata: true, include: [disputedArea], + fill: disputedLands[disputedArea].colorAsSelectable ? defaultLandColour : unselectableLandColor, }); });