customDraw() {
        var ctx = simulationArea.context;
        ctx.beginPath();
        ctx.strokeStyle = ["blue", colors["stroke_alt"]][
            (this.state === undefined) + 0
        ];
        ctx.fillStyle = colors["fill"];
        ctx.lineWidth = correctWidth(3);
        const xx = this.x;
        const yy = this.y;
        rect(ctx, xx - 20, yy - 20, 40, 40);
        if (
            (this.hover && !simulationArea.shiftDown) ||
            simulationArea.lastSelected === this ||
            simulationArea.multipleObjectSelections.contains(this)
        )
            ctx.fillStyle = colors["hover_select"];
        ctx.fill();
        ctx.stroke();

        ctx.beginPath();
        ctx.font = "20px Raleway";
        ctx.fillStyle = colors["input_text"];
        ctx.textAlign = "center";
        var bit;
        if (this.bitSelectorInp.value === undefined) {
            bit = "x";
        } else {
            bit = this.bitSelectorInp.value;
        }

        fillText(ctx, bit, xx, yy + 5);
        ctx.fill();
    }
@memberof BitSelector
function to draw element