diff --git a/public/elotracker/chart-integration.js b/public/elotracker/chart-integration.js index e01d7f5..f20c0da 100644 --- a/public/elotracker/chart-integration.js +++ b/public/elotracker/chart-integration.js @@ -25,6 +25,21 @@ const x_scale = { } } } +const zoom_plugin = { + zoom: { + wheel: { + enabled: true, + }, + pinch: { + enabled: true, + }, + mode: "x", + }, + pan: { + enabled: true, + mode: "x", + }, +} window.onload = create_charts; @@ -108,7 +123,8 @@ async function create_charts() { return context[0].dataset.label; }, } - } + }, + zoom: zoom_plugin, }, scales: { x: x_scale, @@ -142,7 +158,8 @@ async function create_charts() { return context[0].dataset.label; }, } - } + }, + zoom: zoom_plugin, }, scales: { x: x_scale, @@ -190,7 +207,8 @@ async function create_charts() { return context[0].dataset.label; }, } - } + }, + zoom: zoom_plugin, }, scales: { x: x_scale, @@ -286,15 +304,16 @@ function toggle_combined_chart() { chart.classList.add("closed"); } } -function toggle_leaderboard_chart() { +function toggle_leaderboard_chart(event) { if (this.classList.contains("closed")) { this.classList.remove("closed"); } else { + if (event.target.nodeName === "CANVAS") return; this.classList.add("closed"); } } document.querySelectorAll("button.open-general-graph").forEach(element => element.addEventListener("click", toggle_combined_chart)); -document.querySelectorAll("button.leaderboard-element").forEach(element => element.addEventListener("click", toggle_leaderboard_chart)); +document.querySelectorAll("button.leaderboard-element").forEach(element => element.addEventListener("mousedown", toggle_leaderboard_chart)); async function update_leaderboard_entries() { this.disabled = true; diff --git a/public/elotracker/index.php b/public/elotracker/index.php index eba3d97..9eb9ac8 100644 --- a/public/elotracker/index.php +++ b/public/elotracker/index.php @@ -4,27 +4,25 @@ UEM Elo Tracker - - + + + + -UEM LoL Elo-Challenge"; -echo "
"; -echo "
"; -echo ""; -echo "
- - -
"; -echo "
"; -echo "
"; -include "leaderboard_list.php"; -echo "
"; - -?> - +

UEM LoL Elo-Challenge

+
+
+ +
+ + +
+
+
+ +
+ diff --git a/public/elotracker/styles.css b/public/elotracker/styles.css index 0bdd4c5..8517683 100644 --- a/public/elotracker/styles.css +++ b/public/elotracker/styles.css @@ -106,6 +106,10 @@ button.button-updating svg { .leaderboard-element:hover { background-color: #1f2931; } +.leaderboard-element:has(canvas:hover) { + background-color: transparent; + cursor: initial; +} .leaderboard-element.place-1 { border: solid 4px var(--gold-1); } diff --git a/public/util/mysql_connect.php b/public/util/mysql_connect.php index db546d1..3e2626a 100644 --- a/public/util/mysql_connect.php +++ b/public/util/mysql_connect.php @@ -22,6 +22,7 @@ class MySQLConnection { private function createConn(): void { $this->mysqli = new mysqli($this->host . ":" . $this->port, $this->user, $this->pass, $this->dbName); + $this->mysqli->set_charset("utf8"); } public function query($sql): mysqli_result|bool {