Skip to content

Commit

Permalink
feat: show reading gloss on click, not hover
Browse files Browse the repository at this point in the history
  • Loading branch information
arrocke committed Oct 28, 2024
1 parent 479e6f1 commit 165cfb5
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ export default function ReadingView({ chapterId, language, verses }: ReadingView
<Fragment key={word.id}>
<span
className={`
cursor-pointer
${i === verse.words.length - 1 ? 'me-1' : ''}
${(linkedWords.length > 0 &&
popover.selectedWord?.word.id === word.id) ||
Expand All @@ -95,15 +96,13 @@ export default function ReadingView({ chapterId, language, verses }: ReadingView
: ''
}
`}
onDoubleClick={(e) => {
setShowSidebar(true)
}}
onClick={(e) => {
// popover.onWordClick(e, word)
setSidebarWord(word)
setShowSidebar(true)
popover.onWordClick(e, word)
}}
onMouseEnter={(e) =>
popover.onWordMouseEnter(e, word)
}
onMouseLeave={(e) => popover.onWordMouseLeave(e)}
>
{word.text}
</span>
Expand Down

0 comments on commit 165cfb5

Please sign in to comment.