fixed # 新增缩放倍率适配

This commit is contained in:
2026-11-24 14:10:04 +08:00
parent 98116bef7b
commit d61b4b2526
18 changed files with 499 additions and 83 deletions
+2 -1
View File
@@ -415,7 +415,8 @@ export const showMap = (run, { saveRun } = {}) => new Promise(resolve => {
suppressClick = true;
if (!viewport.hasPointerCapture(event.pointerId)) viewport.setPointerCapture(event.pointerId);
viewport.classList.add("dragging");
viewport.scrollTop = drag.top - distance;
const scale = viewport.getBoundingClientRect().height / viewport.offsetHeight || 1;
viewport.scrollTop = drag.top - distance / scale;
event.preventDefault();
});
const endDrag = event => {