Skip to content
This repository has been archived by the owner on Oct 18, 2022. It is now read-only.

Color code US map #179

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Color code US map #179

wants to merge 10 commits into from

Conversation

nmartinez23
Copy link

  • Added US map
  • Added cursor pointer for map
  • Added method to show politicians by clicking on a state
  • Added method to change state's color if the majority of state's politicians are voting for CRA

@holmesworcester
Copy link
Contributor

This is awesome! It seems like the map isn't responsive though? Could you alter styles to fix that?

image

@holmesworcester
Copy link
Contributor

holmesworcester commented Feb 21, 2018

we could also not show the map on screen sizes that are so small as to make clicking it not useful.

@holmesworcester
Copy link
Contributor

holmesworcester commented Feb 21, 2018

My only other issue with this is that right now the map doesn't have enough explanation around it, because the legend ("red = team cable / green = team internet") doesn't really explain the deal with the states.

Ideally the map would say "these are the states where we most need your help!" and a paragraph below would say "These 35 states have one undecided senator who could be our winning vote." or something like that.

It could be in its own section and control its own view once people click on a state.

@nmartinez23 does this make sense? Can you see a solution? I could probably solve this more by playing with it but I'd have to figure out how to create a second state for states, so to speak.

@nmartinez23
Copy link
Author

@holmesworcester Yes it definitely makes sense. I remember Zeke mentioned something earlier about this so I'll meet with him tomorrow morning to see what the best course of action is. Thanks!

@nmartinez23
Copy link
Author

@holmesworcester I added a media query to hide the map on smartphones and tablets in portrait mode. I also added the logic for the undecided states however I ran into a problem trying to add asterisks to the svg path for undecided states.

There are two different undecided methods that are both commented out for now. The one that works lists out undecided states above the map. The other is the one I was trying to get asterisks added to the map. The "textPath" svg attribute will add an asterisk to an undecided state but will get overwritten by the next undecided state in the loop so only the very last undecided state in the loop will end up with an asterisk on the map. I'll keep looking to see if there's a better way.

@nmartinez23
Copy link
Author

@holmesworcester just checking to see what your thoughts are on the most recent changes.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants