export { getWidth, getHeight, getCanvasDivNode, createDiv };

function getWidth() {
    return document.getElementById("3d-graph").offsetWidth;
}

function getHeight() {
    return window.innerHeight - 200;
}

function getCanvasDivNode() {
    const domNode = document.getElementById("3d-graph");
    return domNode.firstChild.firstChild.firstChild;
}

function createDiv(className, parent) {
    const node = document.createElement("div");
    node.className = className;
    if (typeof parent !== "undefined") {
        parent.appendChild(node);
    }
    return node;
}