diff --git a/xray.css b/xray.css
index 0f5ea16..852abe0 100644
--- a/xray.css
+++ b/xray.css
@@ -29,4 +29,8 @@ img {
#menu.start .nostart {
display: none;
+}
+
+#menu input[type=number] {
+ max-width: 36pt;
}
\ No newline at end of file
diff --git a/xray.html b/xray.html
index 0b7d296..76693af 100644
--- a/xray.html
+++ b/xray.html
@@ -25,11 +25,13 @@
diff --git a/xray.js b/xray.js
index d510175..8400b5b 100644
--- a/xray.js
+++ b/xray.js
@@ -75,17 +75,37 @@ document.addEventListener("DOMContentLoaded", e => {
updateOverlay(touches);
});
- document.querySelector("#radius").addEventListener("change", e => {
+ document.querySelector("#radius-slider").addEventListener("input", e => {
try {
radius = parseInt(e.target.value);
+ document.querySelector("#radius-input").value = radius;
} catch {
console.warn("That wasn't a valid radius: " + e.target.value);
}
});
- document.querySelector("#softness").addEventListener("change", e => {
+ document.querySelector("#radius-input").addEventListener("input", e => {
+ try {
+ radius = parseInt(e.target.value);
+ document.querySelector("#radius-slider").value = radius;
+ } catch {
+ console.warn("That wasn't a valid radius: " + e.target.value);
+ }
+ });
+
+ document.querySelector("#softness-slider").addEventListener("input", e => {
+ try {
+ softness = parseInt(e.target.value);
+ document.querySelector("#softness-input").value = softness;
+ } catch {
+ console.warn("That wasn't a valid softness: " + e.target.value);
+ }
+ });
+
+ document.querySelector("#softness-input").addEventListener("input", e => {
try {
softness = parseInt(e.target.value);
+ document.querySelector("#softness-slider").value = softness;
} catch {
console.warn("That wasn't a valid softness: " + e.target.value);
}