portfolio/assets/js/games.js
2025-12-28 19:49:58 -05:00

23 lines
674 B
JavaScript

class Games {
constructor() {
this.gamesContainer = document.getElementById("games-container")
this.gamesInnerContainer = document.getElementById("games")
}
show() {
this.resize()
this.gamesContainer.style.display = 'block'
}
hide() {
this.gamesContainer.style.display = 'none'
}
resize() {
this.gamesContainer.style.width = canvas.getBoundingClientRect().width - 40 + 'px';
this.gamesContainer.style.height = canvas.getBoundingClientRect().height - 40 + 'px';
this.gamesContainer.style.minHeight = canvas.getBoundingClientRect().width - 40 + 'px';
this.gamesInnerContainer.style.height = canvas.getBoundingClientRect().height - 77 + 'px';
}
}