瀏覽代碼

Zoom to the center when the y-axis is unlocked

master
Fen Dweller 5 年之前
父節點
當前提交
fd078ca29f
共有 1 個檔案被更改,包括 5 行新增0 行删除
  1. +5
    -0
      macrovision.js

+ 5
- 0
macrovision.js 查看文件

@@ -2126,8 +2126,13 @@ document.addEventListener("DOMContentLoaded", () => {
toastRateLimit("Zoom is locked! Check Settings to disable.", "zoom-lock", 1000);
} else {
const dir = e.deltaY < 0 ? 10 / 11 : 11 / 10;
const change = config.height.toNumber("meters") - math.multiply(config.height, dir).toNumber("meters");
setWorldHeight(config.height, math.multiply(config.height, dir));
updateWorldOptions();

if (!config.lockYAxis) {
config.y += change / 2;
}
}
}


Loading…
取消
儲存