_checkHidePopup(pointer) {
    const pointerObj = this.selectionHandler._pointerToPositionObject(pointer);

    let stillOnObj = false;
    if (this.popup.popupTargetType === "node") {
      if (this.body.nodes[this.popup.popupTargetId] !== undefined) {
        stillOnObj =
          this.body.nodes[this.popup.popupTargetId].isOverlappingWith(
            pointerObj
          );

        // if the mouse is still one the node, we have to check if it is not also on one that is drawn on top of it.
        // we initially only check stillOnObj because this is much faster.
        if (stillOnObj === true) {
          const overNode = this.selectionHandler.getNodeAt(pointer);
          stillOnObj =
            overNode === undefined
              ? false
              : overNode.id === this.popup.popupTargetId;
        }
      }
    } else {
      if (this.selectionHandler.getNodeAt(pointer) === undefined) {
        if (this.body.edges[this.popup.popupTargetId] !== undefined) {
          stillOnObj =
            this.body.edges[this.popup.popupTargetId].isOverlappingWith(
              pointerObj
            );
        }
      }
    }

    if (stillOnObj === false) {
      this.popupObj = undefined;
      this.popup.hide();
      this.body.emitter.emit("hidePopup");
    }
  }
Check if the popup must be hidden, which is the case when the mouse is no
longer hovering on the object
@param {{x:number, y:number}} pointer
@private