Site
- fix responsive for bar/gaol selector in lobby page
This commit is contained in:
@ -6,7 +6,7 @@
|
|||||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/09/13 13:59:46 by edbernar #+# #+# */
|
/* Created: 2024/09/13 13:59:46 by edbernar #+# #+# */
|
||||||
/* Updated: 2024/10/12 17:15:26 by edbernar ### ########.fr */
|
/* Updated: 2024/10/13 13:44:43 by edbernar ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -90,6 +90,12 @@ class barSelecter
|
|||||||
popup.removeEventListener('click', this.hideSkinSelector);
|
popup.removeEventListener('click', this.hideSkinSelector);
|
||||||
popup.addEventListener('click', this.hideSkinSelector);
|
popup.addEventListener('click', this.hideSkinSelector);
|
||||||
});
|
});
|
||||||
|
window.addEventListener('resize', () => {
|
||||||
|
const pos = div.getBoundingClientRect();
|
||||||
|
this.renderer.setSize(pos.width - 10, pos.height - 10);
|
||||||
|
this.camera.aspect = (pos.width - 10) / (pos.height - 10);
|
||||||
|
this.camera.updateProjectionMatrix();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
hideSkinSelector(event)
|
hideSkinSelector(event)
|
||||||
@ -214,7 +220,12 @@ class goalSelecter
|
|||||||
this.renderer.setAnimationLoop(this.#loop.bind(this));
|
this.renderer.setAnimationLoop(this.#loop.bind(this));
|
||||||
div.removeEventListener('click', this.boundshowGoals);
|
div.removeEventListener('click', this.boundshowGoals);
|
||||||
div.addEventListener('click', this.boundshowGoals);
|
div.addEventListener('click', this.boundshowGoals);
|
||||||
console.warn("gerer le resize pour les bar et goal selector");
|
window.addEventListener('resize', () => {
|
||||||
|
const pos = div.getBoundingClientRect();
|
||||||
|
this.renderer.setSize(pos.width - 10, pos.height - 10);
|
||||||
|
this.camera.aspect = (pos.width - 10) / (pos.height - 10);
|
||||||
|
this.camera.updateProjectionMatrix();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
showGoals()
|
showGoals()
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
/* By: edbernar <edbernar@student.42angouleme. +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2024/10/01 13:42:29 by edbernar #+# #+# */
|
/* Created: 2024/10/01 13:42:29 by edbernar #+# #+# */
|
||||||
/* Updated: 2024/10/10 12:57:56 by edbernar ### ########.fr */
|
/* Updated: 2024/10/12 23:26:19 by edbernar ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
@ -123,6 +123,7 @@ class TournamentPage
|
|||||||
while (i < playerNb.length - 1)
|
while (i < playerNb.length - 1)
|
||||||
{
|
{
|
||||||
playerList['player' + playerNb[i]] = playerList['player' + playerNb[i + 1]];
|
playerList['player' + playerNb[i]] = playerList['player' + playerNb[i + 1]];
|
||||||
|
playerList['player' + playerNb[i]].id--;
|
||||||
document.getElementById('user-' + playerNb[i]).innerText = playerList['player' + playerNb[i]].username;
|
document.getElementById('user-' + playerNb[i]).innerText = playerList['player' + playerNb[i]].username;
|
||||||
document.getElementById('pfp-' + playerNb[i]).style.backgroundImage = `url(${playerList['player' + playerNb[i]].pfp})`;
|
document.getElementById('pfp-' + playerNb[i]).style.backgroundImage = `url(${playerList['player' + playerNb[i]].pfp})`;
|
||||||
i++;
|
i++;
|
||||||
|
Reference in New Issue
Block a user