Skip to content

Commit

Permalink
Merge pull request #340 from emerson-eps/fix-breakage
Browse files Browse the repository at this point in the history
fix: fix breakage due to latest changes
  • Loading branch information
shruthirai authored Nov 14, 2022
2 parents cb073ea + 04db0c3 commit 08910b8
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 29 deletions.
53 changes: 28 additions & 25 deletions react-app/src/component/ColorSelector/ColorSelectorAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,38 +48,41 @@ export const ColorSelectorAccordion = (props: any) => {
className="Container"
style={{
width: "316px",
position: "absolute",
// position: "absolute",
zIndex: 1000,
top: getColorSelectorPosition(props.position, props.isHorizontal).top,
left: getColorSelectorPosition(props.position, props.isHorizontal).left,
}}
>
{!props.isModal && (
<div style={{ cursor: "pointer" }}>
<CancelIcon
style={{
position: "absolute",
top: "-10px",
right: "-10px",
cursor: "pointer",
color: "#007079",
}}
onMouseOver={(e) => {
e.preventDefault();
const target = e.target as SVGAElement;
target.style.color = "#1099a5";
}}
onMouseOut={(e) => {
const target = e.target as SVGAElement;
target.style.color = "#007079";
}}
onClick={props.setIsOpen}
/>
</div>
)}
<Accordion>
<Accordion.Item isExpanded>
<Accordion.Header>Color Scales</Accordion.Header>
<Accordion.Header>
Color Scales
{!props.isModal && (
<div style={{ cursor: "pointer" }}>
<CancelIcon
style={{
// position: "absolute",
top: "-10px",
right: "-10px",
cursor: "pointer",
color: "#007079",
}}
onMouseOver={(e) => {
e.preventDefault();
const target = e.target as SVGAElement;
target.style.color = "#1099a5";
}}
onMouseOut={(e) => {
const target = e.target as SVGAElement;
target.style.color = "#007079";
}}
onClick={props.setIsOpen}
/>
</div>
)}
</Accordion.Header>

<Accordion.Panel>
<Accordion>
<Accordion.Item>
Expand Down
4 changes: 2 additions & 2 deletions react-app/src/component/Legend/ContinuousLegend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,8 @@ export const ContinuousLegend: React.FC<continuousLegendProps> = ({
return (
<div
style={{
position: "absolute",
left: position ? position.left : " ",
// position: "absolute",
right: position ? position.left : " ",
top: position ? position.top : " ",
zIndex: 999,
}}
Expand Down
4 changes: 2 additions & 2 deletions react-app/src/component/Legend/DiscreteLegend.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ export const DiscreteColorLegend: React.FC<discreteLegendProps> = ({
return (
<div
style={{
position: "absolute",
left: position ? position.left : " ",
// position: "absolute",
right: position ? position.left : " ",
top: position ? position.top : " ",
backgroundColor: "#ffffffcc",
borderRadius: "5px",
Expand Down

0 comments on commit 08910b8

Please sign in to comment.