customDraw() {
        var ctx = simulationArea.context;

        const xx = this.x;
        const yy = this.y;

        ctx.beginPath();
        moveTo(
            ctx,
            0,
            this.yOff * 10 * (this.inputSize / 2 - 1) + 10 + 0.5 * this.xOff,
            xx,
            yy,
            this.direction
        );
        lineTo(
            ctx,
            0,
            this.yOff * 5 * (this.inputSize - 1) + this.xOff,
            xx,
            yy,
            this.direction
        );
        ctx.stroke();

        ctx.lineWidth = correctWidth(3);
        ctx.beginPath();
        ctx.strokeStyle = colors["stroke"];

        ctx.fillStyle = colors["fill"];
        moveTo(
            ctx,
            -20 + this.xOff,
            -this.yOff * 10 * (this.inputSize / 2),
            xx,
            yy,
            this.direction
        );
        lineTo(
            ctx,
            -20 + this.xOff,
            20 + this.yOff * 10 * (this.inputSize / 2 - 1),
            xx,
            yy,
            this.direction
        );
        lineTo(
            ctx,
            20 - this.xOff,
            +this.yOff * 10 * (this.inputSize / 2 - 1) + this.xOff,
            xx,
            yy,
            this.direction
        );
        lineTo(
            ctx,
            20 - this.xOff,
            -this.yOff * 10 * (this.inputSize / 2) - this.xOff + 20,
            xx,
            yy,
            this.direction
        );

        ctx.closePath();
        if (
            (this.hover && !simulationArea.shiftDown) ||
            simulationArea.lastSelected === this ||
            simulationArea.multipleObjectSelections.contains(this)
        ) {
            ctx.fillStyle = colors["hover_select"];
        }
        ctx.fill();
        ctx.stroke();

        ctx.beginPath();
        // ctx.lineWidth = correctWidth(2);
        ctx.fillStyle = "black";
        ctx.textAlign = "center";
        for (let i = 0; i < this.inputSize; i++) {
            if (this.direction === "RIGHT")
                fillText(
                    ctx,
                    String(i),
                    xx + this.inp[i].x + 7,
                    yy + this.inp[i].y + 2,
                    10
                );
            else if (this.direction === "LEFT")
                fillText(
                    ctx,
                    String(i),
                    xx + this.inp[i].x - 7,
                    yy + this.inp[i].y + 2,
                    10
                );
            else if (this.direction === "UP")
                fillText(
                    ctx,
                    String(i),
                    xx + this.inp[i].x,
                    yy + this.inp[i].y - 4,
                    10
                );
            else
                fillText(
                    ctx,
                    String(i),
                    xx + this.inp[i].x,
                    yy + this.inp[i].y + 10,
                    10
                );
        }
        ctx.fill();
    }
@memberof Multiplexer
function to draw element