Skip to content

Commit

Permalink
fixed axis values
Browse files Browse the repository at this point in the history
  • Loading branch information
Advay17 committed Oct 18, 2024
1 parent 744aad6 commit 2061cef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,36 @@
<div>
<div class="container desktop-only" id="desktop-axis">
<div class="slider-non">Axis 0</div>
<div class="slider-non" id="axisValue0">127</div>
<div class="slider-non" id="0axisvalue0">127</div>
<div class="slider-bar" id="0bar0"></div>

<div class="slider-non">Axis 1</div>
<div class="slider-non" id="axisValue1">127</div>
<div class="slider-non" id="0axisvalue1">127</div>
<div class="slider-bar" id="0bar1"></div>

<div class="slider-non">Axis 2</div>
<div class="slider-non" id="axisValue2">127</div>
<div class="slider-non" id="0axisvalue2">127</div>
<div class="slider-bar" id="0bar2"></div>

<div class="slider-non">Axis 3</div>
<div class="slider-non" id="axisValue3">127</div>
<div class="slider-non" id="0axisvalue3">127</div>
<div class="slider-bar" id="0bar3"></div>
</div>
<div class="container desktop-only" id="desktop-axis1">
<div class="slider-non">Axis 0</div>
<div class="slider-non" id="axisValue0">127</div>
<div class="slider-non" id="1axisvalue0">127</div>
<div class="slider-bar" id="1bar0"></div>

<div class="slider-non">Axis 1</div>
<div class="slider-non" id="axisValue1">127</div>
<div class="slider-non" id="1axisvalue1">127</div>
<div class="slider-bar" id="1bar1"></div>

<div class="slider-non">Axis 2</div>
<div class="slider-non" id="axisValue2">127</div>
<div class="slider-non" id="1axisvalue2">127</div>
<div class="slider-bar" id="1bar2"></div>

<div class="slider-non">Axis 3</div>
<div class="slider-non" id="axisValue3">127</div>
<div class="slider-non" id="1axisvalue3">127</div>
<div class="slider-bar" id="1bar3"></div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ function createGamepadAgent(gamepadNum) {
return getGamepads().find(gamepad => gamepad.index == gamepadNum);
}

var axisValueElements = document.querySelectorAll('[id^="axisValue"]');
var axisValueElements = document.querySelectorAll('[id^="'+gamepadNum+'axisValue"]');
var barElements = document.querySelectorAll('[id^="'+gamepadNum+'bar"]');
var buttonElements = document.querySelectorAll('[id^="'+gamepadNum+'buttonDesktop"]');

Expand Down

0 comments on commit 2061cef

Please sign in to comment.