customDraw() {
        var ctx = simulationArea.context;
        const xx = this.x;
        const yy = this.y;
        var w = this.elementWidth;
        var h = this.elementHeight;
        if(this.image && this.image.complete) {
            drawImage(ctx, this.image, xx - w / 2, yy - h / 2, w, h);
        }
        else {
            ctx.beginPath();
            ctx.strokeStyle = 'rgba(0,0,0,1)';
            ctx.setLineDash([5 * globalScope.scale, 5 * globalScope.scale]);
            ctx.lineWidth = correctWidth(1.5);

            rect(ctx, xx - w / 2, yy - h / 2, w, h);
            ctx.stroke();

            if (simulationArea.lastSelected === this || simulationArea.multipleObjectSelections.contains(this)) {
                ctx.fillStyle = 'rgba(255, 255, 32,0.1)';
                ctx.fill();
            }

            ctx.beginPath();
            ctx.textAlign = 'center';
            ctx.fillStyle = colors['text'];
            fillText(ctx, "Double Click to Insert Image", xx, yy, 10);
            ctx.fill();

            ctx.setLineDash([]);
        }
    }
@memberof Image
function to draw element