瀏覽代碼

Prevent a world height of 0 from being set

tags/v0.0.1
Fen Dweller 5 年之前
父節點
當前提交
3ddff0de27
共有 2 個檔案被更改,包括 2 行新增2 行删除
  1. +1
    -1
      macrovision.html
  2. +1
    -1
      macrovision.js

+ 1
- 1
macrovision.html 查看文件

@@ -25,7 +25,7 @@
<div id="main-area">
<div id="options">
<div class="option-row">
<input type="number" id="options-height-value" value="10">
<input type="number" id="options-height-value" min="1" value="10">
<select id="options-height-unit">
<option>meters</option>
<option>kilometers</option>


+ 1
- 1
macrovision.js 查看文件

@@ -264,7 +264,7 @@ document.addEventListener("mousemove", (e) => {
});

function updateWorldHeight() {
const value = document.querySelector("#options-height-value").value;
const value = Math.max(1, document.querySelector("#options-height-value").value);
const unit = document.querySelector("#options-height-unit").value;
const oldHeight = config.height;



Loading…
取消
儲存