setLabel(str = '') {
        this.label = str;
        var ctx = simulationArea.context;
        ctx.font = `${this.fontSize}px Raleway`;
        this.leftDimensionX = 10;
        this.rightDimensionX = ctx.measureText(this.label).width + 10;
        this.setTextboxSize();
    }
@memberof Text
function for setting text inside the element
@param {string=} str - the label