diff --git a/website/src/components/explorer/details.jsx b/website/src/components/explorer/details.jsx
index ea43688569..fe9737ff69 100644
--- a/website/src/components/explorer/details.jsx
+++ b/website/src/components/explorer/details.jsx
@@ -62,27 +62,68 @@ function cellUnits(hex) {
: { area: UNITS.m2, dist: UNITS.m };
}
-function ClickableH3Index({ hex, setUserInput }) {
+function ClickableH3Index({ hex, setUserInput, onHoverCells }) {
const onClick = useCallback(() => {
setUserInput(hex);
- }, [hex, setUserInput]);
+ if (onHoverCells) {
+ onHoverCells([]);
+ }
+ }, [hex, setUserInput, onHoverCells]);
+
+ const onMouseEnter = useCallback(() => {
+ if (onHoverCells) {
+ onHoverCells([hex]);
+ }
+ }, [hex, onHoverCells]);
+ const onMouseLeave = useCallback(() => {
+ if (onHoverCells) {
+ onHoverCells([]);
+ }
+ }, [onHoverCells]);
return (
-
+
{hex}
);
}
-function ClickableH3IndexList({ hexes, setUserInput, showAll = true }) {
+function ClickableH3IndexList({
+ hexes,
+ setUserInput,
+ showAll = true,
+ onHoverCells,
+}) {
const onShowAllClick = useCallback(() => {
setUserInput(hexes.join(", "));
}, [hexes, setUserInput]);
+
+ const showAllOnMouseEnter = useCallback(() => {
+ if (onHoverCells) {
+ onHoverCells(hexes);
+ }
+ }, [hexes, onHoverCells]);
+ const showAllOnMouseLeave = useCallback(() => {
+ if (onHoverCells) {
+ onHoverCells([]);
+ }
+ }, [onHoverCells]);
+
return (
<>
{hexes.map((hex, index) => {
const link = (
-
- Lat./Lng.: {coords}
{showCellId ? (
<>
@@ -149,11 +195,15 @@ export function SelectedHexDetails({
>
) : null}
{showNavigation ? (
- <>
-
+ Relations
Parent:{" "}
{parent ? (
-
- >
+ Details
+ Lat./Lng.: {coords}
+
Resolution: {res}
Base cell: {baseCell}
@@ -208,6 +262,7 @@ export function SelectedHexDetails({
hexes={splitUserInput}
setUserInput={setUserInput}
showAll={false}
+ onHoverCells={onHoverCells}
/>