fix: doublepage centered in rtl

This commit is contained in:
Julien Froidefond
2025-02-22 07:16:07 +01:00
parent 72e28ed27b
commit e791fc17f5

View File

@@ -229,8 +229,7 @@ export function BookReader({ book, pages, onClose }: BookReaderProps) {
<div <div
className={cn( className={cn(
"relative h-full flex items-center", "relative h-full flex items-center",
isDoublePage ? "w-1/2 justify-end" : "w-full justify-center", isDoublePage ? "w-1/2 justify-end" : "w-full justify-center"
direction === "rtl" && isDoublePage && "justify-start"
)} )}
> >
<ImageLoader isLoading={isLoading} /> <ImageLoader isLoading={isLoading} />
@@ -249,12 +248,7 @@ export function BookReader({ book, pages, onClose }: BookReaderProps) {
{/* Deuxième page en mode double page */} {/* Deuxième page en mode double page */}
{isDoublePage && shouldShowDoublePage(currentPage) && ( {isDoublePage && shouldShowDoublePage(currentPage) && (
<div <div className={cn("relative h-full w-1/2 flex items-center", "justify-start")}>
className={cn(
"relative h-full w-1/2 flex items-center",
direction === "rtl" ? "justify-end" : "justify-start"
)}
>
<ImageLoader isLoading={secondPageLoading} /> <ImageLoader isLoading={secondPageLoading} />
{nextPageUrl && ( {nextPageUrl && (
<img <img