{#each para.sentences as sentence (sentence.idx)} @@ -22,8 +162,13 @@ {#if !token.is_punct} @@ -43,6 +188,9 @@ flex-direction: column; gap: var(--space-4); font-family: var(--font-body); + /* Allow vertical scroll gestures to pass through; horizontal drags are + intercepted by our pointer handlers for word selection. */ + touch-action: pan-y; } .paragraph { @@ -76,6 +224,9 @@ transition: background-color var(--duration-fast) var(--ease-standard), color var(--duration-fast) var(--ease-standard); + /* Prevent text selection highlight during drag */ + user-select: none; + -webkit-user-select: none; } .word:hover { diff --git a/frontend/src/routes/app/articles/[article_id]/TranslationPanel.svelte b/frontend/src/routes/app/articles/[article_id]/TranslationPanel.svelte index 50f6fb5..331838d 100644 --- a/frontend/src/routes/app/articles/[article_id]/TranslationPanel.svelte +++ b/frontend/src/routes/app/articles/[article_id]/TranslationPanel.svelte @@ -1,58 +1,101 @@ -