constructor(
        x,
        y,
        scope = globalScope,
        dir = "RIGHT",
        bitWidth = 1,
        controlSignalSize = 1
    ) {
        super(x, y, scope, dir, bitWidth);
        /* this is done in this.baseSetup() now
        this.scope['Multiplexer'].push(this);
        */
        this.controlSignalSize =
            controlSignalSize ||
            parseInt(prompt("Enter control signal bitWidth"), 10);
        this.inputSize = 1 << this.controlSignalSize;
        this.xOff = 0;
        this.yOff = 1;
        if (this.controlSignalSize === 1) {
            this.xOff = 10;
        }
        if (this.controlSignalSize <= 3) {
            this.yOff = 2;
        }
        this.setDimensions(20 - this.xOff, this.yOff * 5 * this.inputSize);
        this.rectangleObject = false;
        this.inp = [];
        for (let i = 0; i < this.inputSize; i++) {
            const a = new Node(
                -20 + this.xOff,
                +this.yOff * 10 * (i - this.inputSize / 2) + 10,
                0,
                this
            );
            this.inp.push(a);
        }
        this.output1 = new Node(20 - this.xOff, 0, 1, this);
        this.controlSignalInput = new Node(
            0,
            this.yOff * 10 * (this.inputSize / 2 - 1) + this.xOff + 10,
            0,
            this,
            this.controlSignalSize,
            "Control Signal"
        );
    }
@class
Multiplexer
@extends CircuitElement
@param {number} x - x coordinate of element.
@param {number} y - y coordinate of element.
@param {Scope=} scope - Cirucit on which element is drawn
@param {string=} dir - direction of element
@param {number=} bitWidth - bit width per node.
@param {number=} controlSignalSize - 1 by default
@category modules