change label for aspect lock on token create form, adjust dice scroll logic
This commit is contained in:
parent
76c217511d
commit
4435d1e130
8 changed files with 18 additions and 14 deletions
|
@ -98,7 +98,7 @@ function previewSprite(source) {
|
|||
function toggleAspectLock() {
|
||||
try {
|
||||
const locked = $("token_aspect_lock").checked;
|
||||
$("aspect_lock_label").innerHTML = locked ? "🔒" : "🔓"
|
||||
$("aspect_lock_label").innerHTML = locked ? "w:h locked" : "w:h free"
|
||||
} catch {}
|
||||
}
|
||||
|
||||
|
@ -339,7 +339,7 @@ async function uploadImg(imgType) {
|
|||
if (res.ok) {
|
||||
loadAdmin(tableKey.name, tableKey.passcode);
|
||||
} else {
|
||||
throw new Error("Something went wrong uploading the ${imgType} image...");
|
||||
throw new Error(`Something went wrong uploading the ${imgType} image...`);
|
||||
}
|
||||
} catch (err) {
|
||||
setErr(`${err.name}: ${err.message}`);
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<label>Sprite<select id="sprite_dropdown" onchange="previewSprite(this)"></select></label><br/>
|
||||
<label>Name<input id="token_name"/></label><br/>
|
||||
|
||||
<label>Width<input type="number" id="token_width" min="1" max="9999" step="1" onchange="previewSprite(this)"/></label><label id="aspect_lock_label" for="token_aspect_lock">🔒</label><input type="checkbox" checked id="token_aspect_lock" onchange="toggleAspectLock()"/><br/>
|
||||
<label>Width<input type="number" id="token_width" min="1" max="9999" step="1" onchange="previewSprite(this)"/></label><label id="aspect_lock_label" for="token_aspect_lock">w:h locked</label><input type="checkbox" checked id="token_aspect_lock" onchange="toggleAspectLock()"/><br/>
|
||||
<label>Height<input type="number" id="token_height" min="1" step="1" max="9999" onchange="previewSprite(this)"/></label><br/>
|
||||
<label>cX<input type="number" id="token_cx" min="0" max="9999" step="1" onchange="previewSprite(this)"/></label><br/>
|
||||
<label>cY<input type="number" id="token_cy" min="0" max="9999" step="1" onchange="previewSprite(this)"/></label><br/>
|
||||
|
@ -146,14 +146,14 @@
|
|||
</form>
|
||||
</details>
|
||||
<div id="lag" style="display:none;">lag...</div>
|
||||
<div class="ui_win" id="felt_info"><a href="https://hacklab.nilfm.cc/felt">felt v0.2.3</a> (<a href="https://hacklab.nilfm.cc/felt/raw/main/LICENSE">license</a>) | built with <a href="https://leafletjs.com">leaflet</a> (<a href="https://hacklab.nilfm.cc/felt/raw/main/LEAFLET_LICENSE">license</a>) </div>
|
||||
<div class="ui_win" id="felt_info"><a href="https://hacklab.nilfm.cc/felt">felt v0.2.5</a> (<a href="https://hacklab.nilfm.cc/felt/raw/main/LICENSE">license</a>) | built with <a href="https://leafletjs.com">leaflet</a> (<a href="https://hacklab.nilfm.cc/felt/raw/main/LEAFLET_LICENSE">license</a>) </div>
|
||||
</nav>
|
||||
</body>
|
||||
<script>L_DISABLE_3D = window.location.hash.toLowerCase() === "#no3d";</script>
|
||||
<script src="./leaflet.js?v=1.9.4" type="text/javascript"></script>
|
||||
<script src="./util.js?v=0.2.2" type="text/javascript"></script>
|
||||
<script src="./map.js?v=0.2.2" type="text/javascript"></script>
|
||||
<script src="./socket.js?v=0.2.2" type="text/javascript"></script>
|
||||
<script src="./dice.js?v=0.2.2" type="text/javascript"></script>
|
||||
<script src="./admin.js?v=0.2.2" type="text/javascript"></script>
|
||||
<script src="./util.js?v=0.2.5" type="text/javascript"></script>
|
||||
<script src="./map.js?v=0.2.5" type="text/javascript"></script>
|
||||
<script src="./socket.js?v=0.2.5" type="text/javascript"></script>
|
||||
<script src="./dice.js?v=0.2.5" type="text/javascript"></script>
|
||||
<script src="./admin.js?v=0.2.5" type="text/javascript"></script>
|
||||
</html>
|
||||
|
|
|
@ -193,7 +193,7 @@ function logDice(dice) {
|
|||
try{
|
||||
const p = formatDice(r);
|
||||
diceLog.append(p);
|
||||
p.scrollIntoView();
|
||||
diceLog.scrollTop = diceLog.scrollHeight;
|
||||
} catch{}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,6 +202,10 @@ nav {
|
|||
background: transparent;
|
||||
}
|
||||
|
||||
#aspect_lock_label {
|
||||
color: var(--main_color);
|
||||
}
|
||||
|
||||
#token_aspect_lock {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ function setupDiceAutoScroll() {
|
|||
if (diceWin.open) {
|
||||
const diceLog = $("dice_log");
|
||||
if (diceLog && diceLog.children.length > 0) {
|
||||
diceLog.children[diceLog.children.length - 1].scrollIntoView();
|
||||
diceLog.scrollTop = diceLog.scrollHeight;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -15,6 +15,6 @@
|
|||
<p><a href="/table">Get back to gaming...</a></p>
|
||||
</main>
|
||||
</body>
|
||||
<script src="./util.js?v=0.2.1" type="text/javascript"></script>
|
||||
<script src="./util.js?v=0.2.5" type="text/javascript"></script>
|
||||
</html>
|
||||
<html>
|
|
@ -23,5 +23,5 @@
|
|||
{{end}}
|
||||
</main>
|
||||
</body>
|
||||
<script src="/table/util.js?v=0.2.2" type="text/javascript"></script>
|
||||
<script src="/table/util.js?v=0.2.5" type="text/javascript"></script>
|
||||
</html>
|
|
@ -19,5 +19,5 @@
|
|||
{{end}}
|
||||
</main>
|
||||
</body>
|
||||
<script src="/table/util.js?v=0.2.1" type="text/javascript"></script>
|
||||
<script src="/table/util.js?v=0.2.5" type="text/javascript"></script>
|
||||
</html>
|
Loading…
Reference in a new issue