function updateSelectionsAndPane(scope = globalScope) {
    if (!simulationArea.selected && simulationArea.mouseDown) {
        simulationArea.selected = true;
        simulationArea.lastSelected = scope.root;
        simulationArea.hover = scope.root;
        // Selecting multiple objects
        if (simulationArea.shiftDown) {
            objectSelectionSet(true);
        } else if (!embed) {
            findDimensions(scope);
            miniMapArea.setup();
            $('#miniMap').show();
        }
    } else if (simulationArea.lastSelected === scope.root && simulationArea.mouseDown) {
        // pane canvas to give an idea of grid moving
        if (!objectSelection) {
            globalScope.ox = (simulationArea.mouseRawX - simulationArea.mouseDownRawX) + simulationArea.oldx;
            globalScope.oy = (simulationArea.mouseRawY - simulationArea.mouseDownRawY) + simulationArea.oldy;
            globalScope.ox = Math.round(globalScope.ox);
            globalScope.oy = Math.round(globalScope.oy);
            gridUpdateSet(true);
            if (!embed && !lightMode) miniMapArea.setup();
        } else {
            // idea: kind of empty
        }
    } else if (simulationArea.lastSelected === scope.root) {
        /*
        Select multiple objects by adding them to the array
        simulationArea.multipleObjectSelections when we select
        using shift + mouse movement to select an area but
        not shift + click
        */
        simulationArea.lastSelected = undefined;
        simulationArea.selected = false;
        simulationArea.hover = undefined;
        if (objectSelection) {
            objectSelectionSet(false);
            var x1 = simulationArea.mouseDownX;
            var x2 = simulationArea.mouseX;
            var y1 = simulationArea.mouseDownY;
            var y2 = simulationArea.mouseY;
            // Sort those four points to make a selection pane
            if (x1 > x2) {
                const temp = x1;
                x1 = x2;
                x2 = temp;
            }
            if (y1 > y2) {
                const temp = y1;
                y1 = y2;
                y2 = temp;
            }
            // Select the objects, push them into a list
            for (let i = 0; i < updateOrder.length; i++) {
                for (var j = 0; j < scope[updateOrder[i]].length; j++) {
                    var obj = scope[updateOrder[i]][j];
                    if (simulationArea.multipleObjectSelections.contains(obj)) continue;
                    var x; var
                        y;
                    if (obj.objectType === 'Node') {
                        x = obj.absX();
                        y = obj.absY();
                    } else if (obj.objectType !== 'Wire') {
                        x = obj.x;
                        y = obj.y;
                    } else {
                        continue;
                    }
                    if (x > x1 && x < x2 && y > y1 && y < y2) {
                        simulationArea.multipleObjectSelections.push(obj);
                    }
                }
            }
        }
    }
}
Function to move multiple objects and panes window
deselected using dblclick right now (PR open for esc key)
@param {Scope=} scope - the circuit in which we are selecting stuff
@category engine