render() {

        if (this.media !== "null") {
            var newMedia = document.createElement('div')
            newMedia.innerHTML = `
            <style>
            .gus_card_media_background {
                height: 100%;
                width: 100%;

                background: url(${this.media});
                background-position: center;
                background-size: cover;
            }
            </style>
            <div class="gus_card_media_background">
            </div>
            `
            this.card_media.appendChild(newMedia)
        }
        else {
            this.card_media.style.display = "none"
        }

        this.card_title.innerHTML = this.labelTitle
        this.card_description.innerHTML = this.labelDescription

        if (this.labelText !== "null") {
            var newText = document.createElement('div')
            newText.innerHTML = `
            <style>
            .gus_card_text_content {
                height: 100%;
                width: 100%;

                color: grey;

                margin-left: 10px;

                font-size: 0.8em;
            }
            </style>
            <div class="gus_card_text_content">
                ${this.labelText}
            </div>
            `
            this.card_text.appendChild(newText)
        }
        else {
            this.card_text.style.display = "none"
        }
    }
// Re-render the whole card
Re-render the whole card
Re - render the whole card
render() {
        if (this.media !== "null") {
            var newMedia = document.createElement('div')
            newMedia.innerHTML = `
            <style>
            .gus_card_media_background {
                height: 100%;
                width: 100%;
                background: url(${this.media});
                background-position: center;
                background-size: cover;
            }
            </style>
            <div class="gus_card_media_background">
            </div>
            `
            this.card_media.appendChild(newMedia)
        }
        else {
            this.card_media.style.display = "none"
        }
        this.card_title.innerHTML = this.labelTitle
        this.card_description.innerHTML = this.labelDescription
        if (this.labelText !== "null") {
            var newText = document.createElement('div')
            newText.innerHTML = `
            <style>
            .gus_card_text_content {
                height: 100%;
                width: 100%;
                color: grey;
                margin-left: 10px;
                font-size: 0.8em;
            }
            </style>
            <div class="gus_card_text_content">
                ${this.labelText}
            </div>
            `
            this.card_text.appendChild(newText)
        }
        else {
            this.card_text.style.display = "none"
        }
    }
render ( ) { if ( this . media !== "null" ) { var newMedia = document . createElement ( 'div' ) newMedia . innerHTML = ` ${ this . media } ` this . card_media . appendChild ( newMedia ) } else { this . card_media . style . display = "none" } this . card_title . innerHTML = this . labelTitle this . card_description . innerHTML = this . labelDescription if ( this . labelText !== "null" ) { var newText = document . createElement ( 'div' ) newText . innerHTML = ` ${ this . labelText } ` this . card_text . appendChild ( newText ) } else { this . card_text . style . display = "none" } }
Re-render the whole card
Re - render the whole card