diff --git a/src/components/MiniMap.tsx b/src/components/MiniMap.tsx
index 32adc85..423d265 100644
--- a/src/components/MiniMap.tsx
+++ b/src/components/MiniMap.tsx
@@ -31,6 +31,8 @@ export function MiniMap() {
return () => window.removeEventListener('scroll', _handleScroll)
}, [])
+
+
return (
{
const note = notes.notes.value[noteKey]
+
+ function _handleItemClick(_e: MouseEvent) {
+ window.scrollTo({
+ left: note.position.x - ((viewportWidth / 2) - (note.dimensions.w / 2)),
+ top: note.position.y - ((viewportHeight / 2) - (note.dimensions.h / 2)),
+ behavior: 'smooth'
+ })
+ }
+
return (
-
)
})}
-
+
)
}