get selected() {
    if (this.selectable) {
      const selected = this.#nodes.filter((n) => n.elem.isSelected);
      const len = selected.length;
      if (this.selectable === 'single') {
        return len ? selected[0] : null;
      }
      return selected;
    }
    return null;
  }
/**
   * The currently selected
   * @returns {object|null} An node object if selectable: single
   */
The currently selected
@returns {object|null} An node object if selectable: single
The currently selected @returns { object|null } An node object if selectable : single
get selected() {
    if (this.selectable) {
      const selected = this.#nodes.filter((n) => n.elem.isSelected);
      const len = selected.length;
      if (this.selectable === 'single') {
        return len ? selected[0] : null;
      }
      return selected;
    }
    return null;
  }
get selected ( ) { if ( this . selectable ) { const selected = this . #nodes . filter ( ( n ) => n . elem . isSelected ) ; const len = selected . length ; if ( this . selectable === 'single' ) { return len ? selected [ 0 ] : null ; } return selected ; } return null ; }
The currently selected
 @returns {object|null} An node object if selectable: single
The currently selected @returns { object|null } An node object if selectable : single