Skip to content

Commit

Permalink
Merge pull request #32 from ruralinnovation/development
Browse files Browse the repository at this point in the history
disable pointer events on hover info box
  • Loading branch information
tech-team-rural-mda authored Aug 7, 2024
2 parents cef0dca + e145800 commit 4c248f1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 20 deletions.
6 changes: 4 additions & 2 deletions inst/dist/@cori-risi/components/HoverInfo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ export interface HoverObject {
* // ...
*
* <HoverInfo hoverInfo={hoverInfo}>
* <h3>{ hoverInfo.name }</h3>
* <p className={style['details']}>...</p>
* <div style={{pointerEvents: "none"}}>
* <h3>{ hoverInfo.name }</h3>
* <p>...</p>
* </div>
* </HoverInfo>
* ```
*
Expand Down
2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/components/HoverInfo.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions inst/dist/@cori-risi/components/HoverInfo.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/components/HoverInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 5 additions & 14 deletions lib/@cori-risi/components/HoverInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ export interface HoverObject {
* // ...
*
* <HoverInfo hoverInfo={hoverInfo}>
* <h3>{ hoverInfo.name }</h3>
* <p className={style['details']}>...</p>
* <div style={{pointerEvents: "none"}}>
* <h3>{ hoverInfo.name }</h3>
* <p>...</p>
* </div>
* </HoverInfo>
* ```
*
Expand All @@ -54,21 +56,10 @@ export default function HoverInfo (props: {
position: "fixed",
minWidth: "320px",
minHeight: "240px",
pointerEvents: "none",
zIndex: props.zIndex || 3

}}>
{props.children}
{/*<h3>{ hoverInfo.name }</h3>*/}
{/*<p className={style['prop-score']}>*/}
{/* Propensity score: {hoverInfo.prop_score*100 < 1? "<1": format(".2")(hoverInfo.prop_score * 100)} | Matching: {hoverInfo.prop_score_knearest_match? "Yes": "No"}<br/>*/}
{/*</p>*/}
{/*<hr></hr>*/}
{/*<p className={style['details']}>*/}
{/* B2S winner: {hoverInfo.b2s_flag? "Yes": "No"}<br/>*/}
{/* Population: {format(",")(hoverInfo.pop)}<br/>*/}
{/* Percent employed: {format(".0%")(hoverInfo.pct_prime_emp)}<br/>*/}
{/* Tech share: {format(".0%")(hoverInfo.tech_share)}*/}
{/*</p>*/}
</div>
) : <></>;
}

0 comments on commit 4c248f1

Please sign in to comment.