Skip to content

Commit

Permalink
Viewer: clicking on page scrolls into (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciur authored Sep 24, 2024
1 parent e221671 commit a37cde2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions ui2/src/features/document/components/Thumbnail/Thumbnail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import {
selectCurrentNodeID,
selectDraggedPages,
selectDraggedPagesDocID,
selectDraggedPagesDocParentID
selectDraggedPagesDocParentID,
viewerCurrentPageUpdated
} from "@/features/ui/uiSlice"

import {DRAGGED} from "@/cconstants"
Expand Down Expand Up @@ -79,7 +80,12 @@ export default function Thumbnail({page}: Args) {
}, [draggedPages?.length])

const onClick = () => {
//dispatch(setCurrentPage({mode, page: page.number}))
dispatch(
viewerCurrentPageUpdated({
pageNumber: page.number,
panel: mode
})
)
}

const onLocalDragOver = (event: React.DragEvent<HTMLDivElement>) => {
Expand Down

0 comments on commit a37cde2

Please sign in to comment.