@@ -231,8 +231,7 @@ const Notebook: React.FC = ({}) => {
|
||||
`}</style>
|
||||
<div
|
||||
className={clsx(
|
||||
'drag-bar bg-base-100 absolute -left-2 top-0 h-full w-0.5 cursor-col-resize p-2',
|
||||
isNotebookPinned ? 'bg-base-100' : 'bg-transparent',
|
||||
'drag-bar absolute -left-2 top-0 h-full w-0.5 cursor-col-resize bg-transparent p-2',
|
||||
)}
|
||||
role='slider'
|
||||
tabIndex={0}
|
||||
|
||||
@@ -242,6 +242,20 @@ const SideBar: React.FC<{
|
||||
}
|
||||
}
|
||||
`}</style>
|
||||
<div
|
||||
className={clsx(
|
||||
'drag-bar absolute -right-2 top-0 h-full w-0.5 cursor-col-resize bg-transparent p-1',
|
||||
isMobile && 'hidden',
|
||||
)}
|
||||
role='slider'
|
||||
tabIndex={0}
|
||||
aria-label={_('Resize Sidebar')}
|
||||
aria-orientation='horizontal'
|
||||
aria-valuenow={parseFloat(sideBarWidth)}
|
||||
onMouseDown={handleHorizontalDragStart}
|
||||
onTouchStart={handleHorizontalDragStart}
|
||||
onKeyDown={handleDragKeyDown}
|
||||
></div>
|
||||
<div className='flex-shrink-0'>
|
||||
{isMobile && (
|
||||
<div
|
||||
@@ -291,21 +305,6 @@ const SideBar: React.FC<{
|
||||
) : (
|
||||
<SidebarContent bookDoc={bookDoc} sideBarBookKey={sideBarBookKey!} />
|
||||
)}
|
||||
<div
|
||||
className={clsx(
|
||||
'drag-bar bg-base-100 absolute -right-2 top-0 h-full w-0.5 cursor-col-resize p-1',
|
||||
isSideBarPinned ? 'bg-base-100' : 'bg-transparent',
|
||||
isMobile && 'hidden',
|
||||
)}
|
||||
role='slider'
|
||||
tabIndex={0}
|
||||
aria-label={_('Resize Sidebar')}
|
||||
aria-orientation='horizontal'
|
||||
aria-valuenow={parseFloat(sideBarWidth)}
|
||||
onMouseDown={handleHorizontalDragStart}
|
||||
onTouchStart={handleHorizontalDragStart}
|
||||
onKeyDown={handleDragKeyDown}
|
||||
></div>
|
||||
</div>
|
||||
</>
|
||||
) : null;
|
||||
|
||||
@@ -115,7 +115,11 @@ export const usePagination = (
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (msg.data.type === 'iframe-wheel' && !viewSettings.scrolled) {
|
||||
} else if (
|
||||
msg.data.type === 'iframe-wheel' &&
|
||||
!viewSettings.scrolled &&
|
||||
(!bookData.isFixedLayout || viewSettings.zoomLevel <= 100)
|
||||
) {
|
||||
// The wheel event is handled by the iframe itself in scrolled mode.
|
||||
const { deltaY } = msg.data;
|
||||
if (deltaY > 0) {
|
||||
@@ -143,8 +147,8 @@ export const usePagination = (
|
||||
}
|
||||
} else if (
|
||||
msg.type === 'touch-swipe' &&
|
||||
bookData.bookDoc?.rendition?.layout === 'pre-paginated' &&
|
||||
viewSettings?.zoomLevel === 100
|
||||
bookData.isFixedLayout &&
|
||||
viewSettings!.zoomLevel <= 100
|
||||
) {
|
||||
const { deltaX, deltaY } = msg.detail;
|
||||
if (Math.abs(deltaX) > Math.abs(deltaY) && Math.abs(deltaX) > 30) {
|
||||
|
||||
Reference in New Issue
Block a user