From eac5595d260fac3b242f5e2d1ab1690e165b1a4c Mon Sep 17 00:00:00 2001 From: bgo-eiu <100172442+bgo-eiu@users.noreply.github.com> Date: Mon, 13 Jun 2022 01:01:23 -0400 Subject: [PATCH 1/6] Rename shield40_jp_prefectural.svg to shield40_hexagon_blue.svg --- icons/{shield40_jp_prefectural.svg => shield40_hexagon_blue.svg} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename icons/{shield40_jp_prefectural.svg => shield40_hexagon_blue.svg} (100%) diff --git a/icons/shield40_jp_prefectural.svg b/icons/shield40_hexagon_blue.svg similarity index 100% rename from icons/shield40_jp_prefectural.svg rename to icons/shield40_hexagon_blue.svg From efbb934cbe24c89f1678f8f099468f43bfb1d9ae Mon Sep 17 00:00:00 2001 From: bgo-eiu <100172442+bgo-eiu@users.noreply.github.com> Date: Mon, 13 Jun 2022 01:04:11 -0400 Subject: [PATCH 2/6] Updated Japan prefectural and Pakistan national shields to use hexagon_blue SVG --- src/js/shield_defs.js | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 6dbb7e8e3..4c96c9350 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -2366,7 +2366,7 @@ export function loadShields(shieldImages) { }, }; shields["JP:prefectural"] = { - backgroundImage: shieldImages.shield40_jp_prefectural, + backgroundImage: shieldImages.shield40_hexagon_blue, textLayoutConstraint: ShieldText.ellipseTextConstraint, textColor: Color.shields.white, padding: { @@ -2456,7 +2456,19 @@ export function loadShields(shieldImages) { bottom: 6, }, }; - + + shields["PK:national"] = { + backgroundImage: shieldImages.shield40_hexagon_blue, + textLayoutConstraint: ShieldText.ellipseTextConstraint, + textColor: Color.shields.white, + padding: { + left: 3, + right: 3, + top: 2, + bottom: 2, + }, + }; + shields["KR:expressway"] = { backgroundImage: [ shieldImages.shield40_kr_expressway_2, From 2e89d5e7b9ff2e5035307611c5e916877a9d6717 Mon Sep 17 00:00:00 2001 From: bgo-eiu <100172442+bgo-eiu@users.noreply.github.com> Date: Mon, 13 Jun 2022 01:24:21 -0400 Subject: [PATCH 3/6] npm run code_format to satisfy linter --- package-lock.json | 12 ++++++------ src/js/shield_defs.js | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index a96e34c34..29edb0bf9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2923,9 +2923,9 @@ } }, "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "node_modules/mkdirp-classic": { "version": "0.5.3", @@ -6782,9 +6782,9 @@ } }, "minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", + "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==" }, "mkdirp-classic": { "version": "0.5.3", diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index 4c96c9350..aa8f8aaee 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -2456,7 +2456,7 @@ export function loadShields(shieldImages) { bottom: 6, }, }; - + shields["PK:national"] = { backgroundImage: shieldImages.shield40_hexagon_blue, textLayoutConstraint: ShieldText.ellipseTextConstraint, @@ -2468,7 +2468,7 @@ export function loadShields(shieldImages) { bottom: 2, }, }; - + shields["KR:expressway"] = { backgroundImage: [ shieldImages.shield40_kr_expressway_2, From 076f1bf29e016c3c4bb3cc039ed4b1b1d55ab49d Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 13 Jul 2022 18:08:47 -0400 Subject: [PATCH 4/6] Add Pakistan motorway shield --- ...rz_blue.svg => shield_hex_horz_blue_2.svg} | 0 icons/shield_hex_horz_blue_3.svg | 3 +++ icons/shield_pk_motorway.svg | 3 +++ src/js/shield_defs.js | 23 ++++++++++++------- 4 files changed, 21 insertions(+), 8 deletions(-) rename icons/{shield_hex_horz_blue.svg => shield_hex_horz_blue_2.svg} (100%) create mode 100644 icons/shield_hex_horz_blue_3.svg create mode 100644 icons/shield_pk_motorway.svg diff --git a/icons/shield_hex_horz_blue.svg b/icons/shield_hex_horz_blue_2.svg similarity index 100% rename from icons/shield_hex_horz_blue.svg rename to icons/shield_hex_horz_blue_2.svg diff --git a/icons/shield_hex_horz_blue_3.svg b/icons/shield_hex_horz_blue_3.svg new file mode 100644 index 000000000..5fadcff05 --- /dev/null +++ b/icons/shield_hex_horz_blue_3.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/shield_pk_motorway.svg b/icons/shield_pk_motorway.svg new file mode 100644 index 000000000..ba88e0cf9 --- /dev/null +++ b/icons/shield_pk_motorway.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/js/shield_defs.js b/src/js/shield_defs.js index e63c3e226..9386c08b5 100644 --- a/src/js/shield_defs.js +++ b/src/js/shield_defs.js @@ -326,7 +326,10 @@ export function loadShields(shieldImages) { }; let hexagonHorizontalShieldBlue = { - backgroundImage: shieldImages.shield_hex_horz_blue, + backgroundImage: [ + shieldImages.shield_hex_horz_blue_2, + shieldImages.shield_hex_horz_blue_3, + ], textLayoutConstraint: ShieldText.ellipseTextConstraint, textColor: Color.shields.white, padding: { @@ -2619,7 +2622,10 @@ export function loadShields(shieldImages) { // Japan shields["JP:E"] = roundedRectShield(Color.shields.green, Color.shields.white); shields["JP:national"] = triangleConvexDownShieldBlue; - shields["JP:prefectural"] = hexagonHorizontalShieldBlue; + shields["JP:prefectural"] = { + ...hexagonHorizontalShieldBlue, + backgroundImage: shieldImages.shield_hex_horz_blue_2, + }; [ "aichi", "akita", @@ -2690,15 +2696,16 @@ export function loadShields(shieldImages) { shields["PH:E"] = homeDownShieldYellow; // Pakistan - shields["PK:national"] = { - backgroundImage: shieldImages.shield40_hexagon_blue, - textLayoutConstraint: ShieldText.ellipseTextConstraint, + shields["PK:national"] = hexagonHorizontalShieldBlue; + shields["PK:motorway"] = { + backgroundImage: shieldImages.shield_pk_motorway, + textLayoutConstraint: ShieldText.southHalfellipseTextConstraint, textColor: Color.shields.white, padding: { - left: 3, - right: 3, + left: 2, + right: 2, top: 2, - bottom: 2, + bottom: 7, }, }; From d6a2b5e8f228c82c4227960600f578310f09969f Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 13 Jul 2022 18:24:03 -0400 Subject: [PATCH 5/6] Add Pakistan to shield map --- doc-img/shield_map_world.svg | 1 + 1 file changed, 1 insertion(+) diff --git a/doc-img/shield_map_world.svg b/doc-img/shield_map_world.svg index cc543d075..0d32cf0e5 100644 --- a/doc-img/shield_map_world.svg +++ b/doc-img/shield_map_world.svg @@ -129,6 +129,7 @@ See the end of this file for a list of available jurisdictions and their codes. .my, .np, .ph, +.pk, .kr, .tw, .vn, From 3e2299021728f8f1b9eb13ac56492885f2021981 Mon Sep 17 00:00:00 2001 From: Clay Smalley Date: Wed, 13 Jul 2022 18:25:05 -0400 Subject: [PATCH 6/6] Remove duplicate SVG --- icons/shield40_hexagon_blue.svg | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 icons/shield40_hexagon_blue.svg diff --git a/icons/shield40_hexagon_blue.svg b/icons/shield40_hexagon_blue.svg deleted file mode 100644 index dd6820c59..000000000 --- a/icons/shield40_hexagon_blue.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -