From ee48e0e41b6cdb536dc10e13d94aebd99d097b36 Mon Sep 17 00:00:00 2001 From: Thomas Kennedy Date: Sun, 15 Aug 2021 13:34:34 -0500 Subject: [PATCH 1/5] Added suit jersey option. Tie color based on team primary color. --- svgs/jersey/suit.svg | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 svgs/jersey/suit.svg diff --git a/svgs/jersey/suit.svg b/svgs/jersey/suit.svg new file mode 100644 index 00000000..8b18f23a --- /dev/null +++ b/svgs/jersey/suit.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 61c6240790bce54f8ff9b9724b63dcffec477ba3 Mon Sep 17 00:00:00 2001 From: Thomas Kennedy Date: Sun, 15 Aug 2021 13:40:12 -0500 Subject: [PATCH 2/5] Second suit with stripes --- svgs/jersey/suit2.svg | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 svgs/jersey/suit2.svg diff --git a/svgs/jersey/suit2.svg b/svgs/jersey/suit2.svg new file mode 100644 index 00000000..2ca7e138 --- /dev/null +++ b/svgs/jersey/suit2.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 153f8282e772534a0ff01e09b3e70893a1f1f519 Mon Sep 17 00:00:00 2001 From: Thomas Kennedy Date: Sun, 15 Aug 2021 13:51:58 -0500 Subject: [PATCH 3/5] Exclude accessories if person wearing suit --- src/display.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/display.ts b/src/display.ts index f5721c38..46b336ab 100644 --- a/src/display.ts +++ b/src/display.ts @@ -103,6 +103,11 @@ const drawFeature = (svg: SVGSVGElement, face: Face, info: FeatureInfo) => { return; } + if ((['suit', 'suit2'].includes(face['jersey']) ) && (info.name == 'accessories')){ + //Don't show headband, facemask, etc if person is wearing a suit + return; + } + // @ts-ignore let featureSVGString = svgs[info.name][feature.id]; if (!featureSVGString) { From ddcd2e86d62b9988781f311d805bd6765ed4cd30 Mon Sep 17 00:00:00 2001 From: Thomas Kennedy Date: Sun, 15 Aug 2021 13:52:50 -0500 Subject: [PATCH 4/5] Additional comment --- src/display.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/display.ts b/src/display.ts index 46b336ab..3ef8afb8 100644 --- a/src/display.ts +++ b/src/display.ts @@ -105,6 +105,7 @@ const drawFeature = (svg: SVGSVGElement, face: Face, info: FeatureInfo) => { if ((['suit', 'suit2'].includes(face['jersey']) ) && (info.name == 'accessories')){ //Don't show headband, facemask, etc if person is wearing a suit + //might be a smarter way to do that includes statement, but wanted to throw in all non-jersey clothing. Only those 2 right now return; } From 3a2f7fc98a03b14de3e800c09cb430440a57d1c6 Mon Sep 17 00:00:00 2001 From: Thomas Kennedy Date: Sun, 15 Aug 2021 14:07:56 -0500 Subject: [PATCH 5/5] Changed logic in face reference, and included glasses in the accessory exclusion --- src/display.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/display.ts b/src/display.ts index 3ef8afb8..4004dbd8 100644 --- a/src/display.ts +++ b/src/display.ts @@ -103,7 +103,10 @@ const drawFeature = (svg: SVGSVGElement, face: Face, info: FeatureInfo) => { return; } - if ((['suit', 'suit2'].includes(face['jersey']) ) && (info.name == 'accessories')){ + if ( + ["suit", "suit2"].includes(face.jersey.id) && + (info.name == "accessories" || info.name == "glasses") + ) { //Don't show headband, facemask, etc if person is wearing a suit //might be a smarter way to do that includes statement, but wanted to throw in all non-jersey clothing. Only those 2 right now return;