23 lines
646 B
JavaScript
23 lines
646 B
JavaScript
class Portfolio {
|
|
constructor() {
|
|
this.container = document.getElementById("portfolio-container")
|
|
this.innerContainer = document.getElementById("portfolio")
|
|
}
|
|
|
|
show() {
|
|
this.resize()
|
|
this.container.style.display = 'block'
|
|
}
|
|
|
|
hide() {
|
|
this.container.style.display = 'none'
|
|
}
|
|
|
|
resize() {
|
|
this.container.style.width = canvas.getBoundingClientRect().width - 40 + 'px';
|
|
this.container.style.height = canvas.getBoundingClientRect().height - 40 + 'px';
|
|
this.container.style.minHeight = canvas.getBoundingClientRect().width - 40 + 'px';
|
|
|
|
this.innerContainer.style.height = canvas.getBoundingClientRect().height - 77 + 'px';
|
|
}
|
|
}
|