mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 20:32:12 +08:00
This commit is contained in:
parent
9cf02cb629
commit
cc27cb6ef9
@ -32,6 +32,12 @@ export const pdfResize = () => {
|
|||||||
if (!pdfDocument) {
|
if (!pdfDocument) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
const pdfViewerElement = item.element.querySelector("#viewerContainer")
|
||||||
|
if (pdfViewerElement) {
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/6890
|
||||||
|
pdfViewerElement.scrollTo(0, parseInt(pdfViewerElement.getAttribute("data-scrolltop")));
|
||||||
|
pdfViewerElement.removeAttribute("data-scrolltop")
|
||||||
|
}
|
||||||
const currentScaleValue = pdfViewer.currentScaleValue;
|
const currentScaleValue = pdfViewer.currentScaleValue;
|
||||||
if (
|
if (
|
||||||
currentScaleValue === "auto" ||
|
currentScaleValue === "auto" ||
|
||||||
|
@ -280,6 +280,13 @@ export class Wnd {
|
|||||||
const targetWnd = getInstanceById(targetWndElement.getAttribute("data-id")) as Wnd;
|
const targetWnd = getInstanceById(targetWndElement.getAttribute("data-id")) as Wnd;
|
||||||
const tabId = event.dataTransfer.getData(Constants.SIYUAN_DROP_TAB);
|
const tabId = event.dataTransfer.getData(Constants.SIYUAN_DROP_TAB);
|
||||||
const oldTab = getInstanceById(tabId) as Tab;
|
const oldTab = getInstanceById(tabId) as Tab;
|
||||||
|
if (oldTab.model instanceof Asset) {
|
||||||
|
// https://github.com/siyuan-note/siyuan/issues/6890
|
||||||
|
const pdfViewerElement = oldTab.model.element.querySelector("#viewerContainer")
|
||||||
|
if (pdfViewerElement) {
|
||||||
|
pdfViewerElement.setAttribute("data-scrolltop", pdfViewerElement.scrollTop.toString())
|
||||||
|
}
|
||||||
|
}
|
||||||
if (dragElement.style.height === "50%" || dragElement.style.width === "50%") {
|
if (dragElement.style.height === "50%" || dragElement.style.width === "50%") {
|
||||||
// split
|
// split
|
||||||
if (dragElement.style.height === "50%") {
|
if (dragElement.style.height === "50%") {
|
||||||
|
Loading…
Reference in New Issue
Block a user