customDraw() {
        var ctx = simulationArea.context;
        ctx.beginPath();
        ctx.strokeStyle = 'rgba(0,0,0,1)';
        ctx.setLineDash([5 * globalScope.scale, 5 * globalScope.scale]);
        ctx.lineWidth = correctWidth(1.5);
        const xx = this.x;
        const yy = this.y;
        rect(ctx, xx, yy, this.elementWidth, this.elementHeight);
        ctx.stroke();

        if (simulationArea.lastSelected === this || simulationArea.multipleObjectSelections.contains(this)) {
            ctx.fillStyle = 'rgba(255, 255, 32,0.1)';
            ctx.fill();
        }
        ctx.setLineDash([]);
    }
@memberof Rectangle
function to draw element