@@ -79,6 +79,7 @@ const FooterBar: React.FC<FooterBarProps> = ({
|
||||
appService?.hasRoundedWindow && 'rounded-window-bottom-right',
|
||||
!isSideBarVisible && appService?.hasRoundedWindow && 'rounded-window-bottom-left',
|
||||
isHoveredAnim && 'hover-bar-anim',
|
||||
viewSettings?.vertical && viewSettings?.scrolled ? 'mb-3 !h-6' : '',
|
||||
hoveredBookKey === bookKey ? `opacity-100` : `opacity-0`,
|
||||
)}
|
||||
dir={viewSettings?.rtl ? 'rtl' : 'ltr'}
|
||||
|
||||
@@ -58,12 +58,15 @@ export const useClickEvent = (
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (msg.data.type === 'iframe-wheel' && !viewSettings.scrolled) {
|
||||
} else if (msg.data.type === 'iframe-wheel') {
|
||||
const { deltaY } = msg.data;
|
||||
const fontSize = viewSettings?.defaultFontSize ?? 16;
|
||||
const lineHeight = viewSettings?.lineHeight ?? 1.6;
|
||||
const distance = fontSize * lineHeight * 3;
|
||||
if (deltaY > 0) {
|
||||
viewRef.current?.next(1);
|
||||
viewRef.current?.next(viewSettings.scrolled ? distance : 1);
|
||||
} else if (deltaY < 0) {
|
||||
viewRef.current?.prev(1);
|
||||
viewRef.current?.prev(viewSettings.scrolled ? distance : 1);
|
||||
}
|
||||
} else if (msg.data.type === 'iframe-mouseup') {
|
||||
if (msg.data.button === 3) {
|
||||
|
||||
Reference in New Issue
Block a user