Skip to content

Commit

Permalink
change the hover to sync for viz
Browse files Browse the repository at this point in the history
  • Loading branch information
CloudLun committed Dec 13, 2023
1 parent 9903d96 commit a2419d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
4 changes: 2 additions & 2 deletions components/SidePanel/LegislationColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Props = {
const LegislationColumns = ({ legislation, name, number, content, expand, calulated, legislationsClickHandler }: Props) => {

return (
<div className={`flex flex-col pt-[12px] lg:pt-[10.5px] pb-[0px] text-rtc_navy ${expand ? " h-[calc(100vh-112px-230px)] xl:h-[calc(100vh-112px-200px)] bg-white overflow-y-hidden" : "h-[40px] bg-background_blue overflow-y-hidden"} border-b-[1px] border-grey_1 `} onClick={legislationsClickHandler}>
<div className={`flex flex-col pt-[12px] lg:pt-[10.5px] pb-[0px] w-full text-rtc_navy ${expand ? " h-[calc(100vh-112px-230px)] xl:h-[calc(100vh-112px-200px)] bg-white overflow-y-hidden" : "h-[40px] bg-background_blue overflow-y-hidden"} border-b-[1px] border-grey_1 `} onClick={legislationsClickHandler}>
<div className={`flex justify-between items-center mx-[20px] ${expand ? "mb-0" : "mb-5"} cursor-pointer`}>
<h2 className="font-semibold text-[13px] lg:text-title uppercase">{name}</h2>
{
Expand All @@ -32,7 +32,7 @@ const LegislationColumns = ({ legislation, name, number, content, expand, calula
| "Winter Eviction Moratorium"} />
}

<div className='mx-[20px] mb-[40px]'>
<div className='mx-[20px] mb-[30px]'>
<h2 className='font-semibold text-[13px] lg:text-title'>{name}</h2>
<h2 className='mb-[14px] font-semibold text-[13px] lg:text-title'>({number})</h2>
<p className='mb-[14px] font-regular text-[12px] lg:text-body'>{content}</p>
Expand Down
21 changes: 8 additions & 13 deletions components/SidePanel/VotesVisualization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,12 @@ const VotesVisualization = ({ legislation }: Props) => {
.on("mouseover", () => setLabelShown({
senateDemoVotes: true,
senateRepVotes: false,
assemblyDemoVotes: false,
assemblyDemoVotes: true,
assemblyRepVotes: false,
simpleMajority: false,
superMajority: false,
senateTotalVotes: false,
assemblyTotalVotes: true
assemblyTotalVotes: false
}))

senateSvg
Expand All @@ -198,11 +198,11 @@ const VotesVisualization = ({ legislation }: Props) => {
senateDemoVotes: false,
senateRepVotes: true,
assemblyDemoVotes: false,
assemblyRepVotes: false,
assemblyRepVotes: true,
simpleMajority: false,
superMajority: false,
senateTotalVotes: false,
assemblyTotalVotes: true
assemblyTotalVotes: false
}))

assemblySvg
Expand All @@ -216,13 +216,13 @@ const VotesVisualization = ({ legislation }: Props) => {
.attr('height', barChartHeight)
.attr('fill', "#007CEE")
.on("mouseover", () => setLabelShown({
senateDemoVotes: false,
senateDemoVotes: true,
senateRepVotes: false,
assemblyDemoVotes: true,
assemblyRepVotes: false,
simpleMajority: false,
superMajority: false,
senateTotalVotes: true,
senateTotalVotes: false,
assemblyTotalVotes: false
}))

Expand All @@ -238,16 +238,15 @@ const VotesVisualization = ({ legislation }: Props) => {
.attr('fill', "#D04E40")
.on("mouseover", () => setLabelShown({
senateDemoVotes: false,
senateRepVotes: false,
senateRepVotes: true,
assemblyDemoVotes: false,
assemblyRepVotes: true,
simpleMajority: false,
superMajority: false,
senateTotalVotes: true,
senateTotalVotes: false,
assemblyTotalVotes: false
}))


senateSvg
.append("line")
.attr("x1", (width) / 2)
Expand Down Expand Up @@ -404,10 +403,6 @@ const VotesVisualization = ({ legislation }: Props) => {
})






return (
<div className='px-[20px] mb-[20px] w-full text-rtc_navy bg-white rounded-[8px] '>
<div className='mb-[20px]'>
Expand Down

0 comments on commit a2419d0

Please sign in to comment.