mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
1 parent
13b074c922
commit
010baf3370
2 files changed
+14
-4
No files matched your search
@@ -2886,6 +2886,16 @@ button.outline-link:hover {
|
|||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.page-frame.continuous .page-shell::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
border-right: 1px solid rgba(170, 183, 193, 0.55);
|
||||||
|
border-bottom: 1px solid rgba(170, 183, 193, 0.55);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.page-shell.error {
|
.page-shell.error {
|
||||||
background: #fff8f7;
|
background: #fff8f7;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9862,7 +9862,7 @@ function pageShell(index) {
|
|||||||
function scrollToPage(index) {
|
function scrollToPage(index) {
|
||||||
if (state.pageLayout > 1 && state.pageWindow) {
|
if (state.pageLayout > 1 && state.pageWindow) {
|
||||||
const view = state.pageWindow, start = pageGroupStart(index);
|
const view = state.pageWindow, start = pageGroupStart(index);
|
||||||
const size = pageGroupSize(start), gap = PAGE_LAYOUT_GAP;
|
const size = pageGroupSize(start), gap = state.continuous ? 0 : PAGE_LAYOUT_GAP;
|
||||||
const height = size.height * MM_TO_PX * state.scale;
|
const height = size.height * MM_TO_PX * state.scale;
|
||||||
const whole = height <= el.viewerPanel.clientHeight - pageBlockSpace() * 2 + 1;
|
const whole = height <= el.viewerPanel.clientHeight - pageBlockSpace() * 2 + 1;
|
||||||
const space = state.fitMode === "height" && !state.continuous
|
const space = state.fitMode === "height" && !state.continuous
|
||||||
@@ -10067,7 +10067,7 @@ function layoutPages() {
|
|||||||
const anchor = view.offsets.length > 1 ? pageWindowAnchor(view) : { index: state.pageIndex, offset: 0 };
|
const anchor = view.offsets.length > 1 ? pageWindowAnchor(view) : { index: state.pageIndex, offset: 0 };
|
||||||
const gap = state.continuous ? 0 : Math.max(state.pageLayout > 1 ? PAGE_LAYOUT_GAP : 0, Number.parseFloat(getComputedStyle(el.svgHost).rowGap) || 0);
|
const gap = state.continuous ? 0 : Math.max(state.pageLayout > 1 ? PAGE_LAYOUT_GAP : 0, Number.parseFloat(getComputedStyle(el.svgHost).rowGap) || 0);
|
||||||
if (state.pageLayout > 1) {
|
if (state.pageLayout > 1) {
|
||||||
const count = state.doc.pages.length, spacing = PAGE_LAYOUT_GAP;
|
const count = state.doc.pages.length, spacing = state.continuous ? 0 : PAGE_LAYOUT_GAP;
|
||||||
view.columns = 2;
|
view.columns = 2;
|
||||||
view.offsets = new Float64Array(count + 1);
|
view.offsets = new Float64Array(count + 1);
|
||||||
view.heights = new Float64Array(count);
|
view.heights = new Float64Array(count);
|
||||||
@@ -12094,7 +12094,7 @@ function fitWidth(updateStatus = true) {
|
|||||||
function fitWidthScale(page) {
|
function fitWidthScale(page) {
|
||||||
if (state.pageLayout > 1) {
|
if (state.pageLayout > 1) {
|
||||||
const size = pageGroupSize();
|
const size = pageGroupSize();
|
||||||
return Math.min(4, Math.max(1, el.viewerPanel.clientWidth - pageSpace() * 2 - PAGE_LAYOUT_GAP - scrollbarWidth()) / (size.width * MM_TO_PX));
|
return Math.min(4, Math.max(1, el.viewerPanel.clientWidth - pageSpace() * 2 - (state.continuous ? 0 : PAGE_LAYOUT_GAP) - scrollbarWidth()) / (size.width * MM_TO_PX));
|
||||||
}
|
}
|
||||||
page = pageViewSize(page);
|
page = pageViewSize(page);
|
||||||
const space = pageSpace();
|
const space = pageSpace();
|
||||||
@@ -12125,7 +12125,7 @@ function fitHeight(updateStatus = true) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (state.pageLayout > 1) {
|
if (state.pageLayout > 1) {
|
||||||
const size = pageGroupSize(), space = pageSpace(), gap = PAGE_LAYOUT_GAP;
|
const size = pageGroupSize(), space = pageSpace(), gap = state.continuous ? 0 : PAGE_LAYOUT_GAP;
|
||||||
const width = Math.max(1, el.viewerPanel.clientWidth - space * 2 - gap - scrollbarWidth());
|
const width = Math.max(1, el.viewerPanel.clientWidth - space * 2 - gap - scrollbarWidth());
|
||||||
const height = Math.max(1, el.viewerPanel.clientHeight - space * 2);
|
const height = Math.max(1, el.viewerPanel.clientHeight - space * 2);
|
||||||
setScale(Math.min(width / (size.width * MM_TO_PX), height / (size.height * MM_TO_PX)), updateStatus, "height");
|
setScale(Math.min(width / (size.width * MM_TO_PX), height / (size.height * MM_TO_PX)), updateStatus, "height");
|
||||||
|
|||||||
Reference in new issue
Block a user