render() {
        this.progress_bar_filler.style.width = `${this.filling / this.maxFilling * 100}%`
        
        if (this.display) { // Display text on the progress bar
            this.progress_bar.style.display = "grid"
            this.progress_bar_display_div.style.display = "inline-block"
            if (this.toDisplay) { // Display text given by the user
                this.progress_bar_display.innerHTML = `${this.toDisplay}`
            }
            else { // Display a standard text of type "x%"
                this.progress_bar_display.innerHTML = `${Math.round(this.filling / this.maxFilling * 100)}%`
            }
        }
        else {
            this.progress_bar.style.display = "inline-block"
            this.progress_bar_display_div.style.display = "none"
        }
    }
// Re-render the whole progress bar
Re-render the whole progress bar
Re - render the whole progress bar
render() {
        this.progress_bar_filler.style.width = `${this.filling / this.maxFilling * 100}%`
        if (this.display) { 
            this.progress_bar.style.display = "grid"
            this.progress_bar_display_div.style.display = "inline-block"
            if (this.toDisplay) { 
                this.progress_bar_display.innerHTML = `${this.toDisplay}`
            }
            else { 
                this.progress_bar_display.innerHTML = `${Math.round(this.filling / this.maxFilling * 100)}%`
            }
        }
        else {
            this.progress_bar.style.display = "inline-block"
            this.progress_bar_display_div.style.display = "none"
        }
    }
render ( ) { this . progress_bar_filler . style . width = ` ${ this . filling / this . maxFilling * 100 } ` if ( this . display ) { this . progress_bar . style . display = "grid" this . progress_bar_display_div . style . display = "inline-block" if ( this . toDisplay ) { this . progress_bar_display . innerHTML = ` ${ this . toDisplay } ` } else { this . progress_bar_display . innerHTML = ` ${ Math . round ( this . filling / this . maxFilling * 100 ) } ` } } else { this . progress_bar . style . display = "inline-block" this . progress_bar_display_div . style . display = "none" } }
Re-render the whole progress bar
Re - render the whole progress bar
// Display text on the progress bar // Display text given by the user // Display a standard text of type "x%"