diff --git a/src/index.css b/src/index.css index c30e4c2..fd5ef1f 100644 --- a/src/index.css +++ b/src/index.css @@ -120,3 +120,35 @@ div.stf__item.page, .flipbook-container .page { border-radius: 0; } + +/* جلوگیری از نمایش محتوای صفحات غیرفعال هنگام هاور */ +.flipbook-container .stf__item { + overflow: hidden !important; + isolation: isolate; + contain: layout style paint; +} + +/* اطمینان از overflow hidden برای محتوای صفحات */ +.flipbook-container .stf__item .page { + overflow: hidden !important; + position: relative; + isolation: isolate; +} + +/* مخفی کردن محتوای صفحات غیرفعال - فقط صفحه فعلی قابل تعامل است */ +.flipbook-container .stf__wrapper { + overflow: hidden; + isolation: isolate; +} + +/* جلوگیری از نمایش محتوای صفحات پشت صفحه فعلی */ +.flipbook-container .stf__item { + pointer-events: none; +} + +/* فعال کردن pointer events فقط برای صفحه فعلی */ +.flipbook-container .stf__item.stf__item--active, +.flipbook-container .stf__item:hover { + pointer-events: auto; + z-index: 100; +} diff --git a/src/pages/viewer/components/BookPage.tsx b/src/pages/viewer/components/BookPage.tsx index ccde0cb..e8bdddb 100644 --- a/src/pages/viewer/components/BookPage.tsx +++ b/src/pages/viewer/components/BookPage.tsx @@ -412,6 +412,8 @@ const BookPage = forwardRef(({ page, scale = 1 }, boxSizing: 'border-box', width: `${794 * scale}px`, height: `${1123 * scale}px`, + isolation: 'isolate', + zIndex: 1, }} > {page.elements.map((element, index) => renderObject(element, index))} diff --git a/src/pages/viewer/components/BookViewer.tsx b/src/pages/viewer/components/BookViewer.tsx index d37c44f..b833188 100644 --- a/src/pages/viewer/components/BookViewer.tsx +++ b/src/pages/viewer/components/BookViewer.tsx @@ -46,7 +46,7 @@ const BookViewer: FC = ({ pages }) => { return (
{/* نمایش کتاب */} -
+
{/* Border و Shadow عمودی در وسط کتاب */}
= ({ pages }) => { boxShadow: '-5px 0 15px rgba(0, 0, 0, 0.15), 5px 0 15px rgba(0, 0, 0, 0.15)' }} /> +
= ({ pages }) => { ))} +
{/* کنترل‌های ناوبری */}