From 921509a23b58ca70905e2af3c1b7daf7355f6ab6 Mon Sep 17 00:00:00 2001 From: Evan Date: Sun, 9 Feb 2025 13:51:29 -0800 Subject: [PATCH] fix sliders not getting input bug --- src/client/graphics/layers/ControlPanel.ts | 104 ++++++++++++--------- 1 file changed, 61 insertions(+), 43 deletions(-) diff --git a/src/client/graphics/layers/ControlPanel.ts b/src/client/graphics/layers/ControlPanel.ts index 596ece856..7e083e183 100644 --- a/src/client/graphics/layers/ControlPanel.ts +++ b/src/client/graphics/layers/ControlPanel.ts @@ -135,62 +135,80 @@ export class ControlPanel extends LitElement implements Layer { -
+
-
-
- { - this.targetTroopRatio = - parseInt((e.target as HTMLInputElement).value) / 100; - this.onTroopChange(this.targetTroopRatio); - }} - class="absolute w-full top-3 m-0 opacity-0 cursor-pointer" - /> +
+ +
+ +
+ + { + this.targetTroopRatio = + parseInt((e.target as HTMLInputElement).value) / 100; + this.onTroopChange(this.targetTroopRatio); + }} + class="absolute left-0 right-0 top-2 m-0 h-4 opacity-0 cursor-pointer" + /> + +
+
-
+
-
-
-
- { - this.attackRatio = - parseInt((e.target as HTMLInputElement).value) / 100; - this.onAttackRatioChange(this.attackRatio); - }} - class="absolute w-full top-3 m-0 opacity-0 cursor-pointer" - /> +
+ +
+ +
+ + { + this.attackRatio = + parseInt((e.target as HTMLInputElement).value) / 100; + this.onAttackRatioChange(this.attackRatio); + }} + class="absolute left-0 right-0 top-2 m-0 h-4 opacity-0 cursor-pointer" + /> + +
+
`; } + createRenderRoot() { return this; // Disable shadow DOM to allow Tailwind styles }