checkHover() {
        if (!simulationArea.mouseDown) {
            if (simulationArea.hover == this) {
                this.hover = this.isHover();
                if (!this.hover) {
                    simulationArea.hover = undefined;
                    this.showHover = false;
                }
            } else if (!simulationArea.hover) {
                this.hover = this.isHover();
                if (this.hover) {
                    simulationArea.hover = this;
                } else {
                    this.showHover = false;
                }
            } else {
                this.hover = false;
                this.showHover = false;
            }
        }
    }
this function checks if hover over the node